diff options
author | Revanth Rajashekar <revanth.rajashekar@intel.com> | 2019-08-20 11:30:50 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-20 11:33:21 -0400 |
commit | 89c6cc2cab7e5090dc85ce0162ce92903b3aac5d (patch) | |
tree | 68ecd4ab58448009f2aea4678e3e07e5d99d5e21 /block | |
parent | 5cc23ed75b629dfb0f8f7a7d0c80e0bab36b3960 (diff) |
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 <revanth.rajashekar@intel.com>
Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/sed-opal.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c index d442f29e84f1..4e95a9792162 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, | |||
905 | num_entries++; | 905 | num_entries++; |
906 | } | 906 | } |
907 | 907 | ||
908 | if (num_entries == 0) { | ||
909 | pr_debug("Couldn't parse response.\n"); | ||
910 | return -EINVAL; | ||
911 | } | ||
912 | resp->num = num_entries; | 908 | resp->num = num_entries; |
913 | 909 | ||
914 | return 0; | 910 | return 0; |