提交 89c6cc2c 编写于 作者: R Revanth Rajashekar 提交者: Jens Axboe

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: NRevanth Rajashekar <revanth.rajashekar@intel.com>
Reviewed-by: NScott Bauer <sbauer@plzdonthack.me>
Reviewed-by: NJon Derrick <jonathan.derrick@intel.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 5cc23ed7
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册