From: Revanth Rajashekar Date: Tue, 20 Aug 2019 15:30:50 +0000 (-0600) Subject: block: sed-opal: Remove always false conditional statement X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=89c6cc2cab7e5090dc85ce0162ce92903b3aac5d;p=linux.git block: sed-opal: Remove always false conditional statement In the function 'response_parse', num_entries will never be 0 as slen is checked for 0. Hence, the condition 'if (num_entries == 0)' can never be true. Signed-off-by: Revanth Rajashekar Reviewed-by: Scott Bauer Reviewed-by: Jon Derrick Signed-off-by: Jens Axboe --- diff --git a/block/sed-opal.c b/block/sed-opal.c index d442f29e84f12..4e95a97921625 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c @@ -905,10 +905,6 @@ static int response_parse(const u8 *buf, size_t length, num_entries++; } - if (num_entries == 0) { - pr_debug("Couldn't parse response.\n"); - return -EINVAL; - } resp->num = num_entries; return 0;