X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=block%2Fsed-opal.c;h=4f5e70d4abc3cd282db163c6614b24c31a4c0fe5;hb=f8d278b955660fdc715f91ebb5a15b6f8d759a78;hp=9ed51d0c6b1d171fc2eab785ef854b64f93721fe;hpb=1ef6f346c62f386f28b0012d6379e2822a3842d3;p=mirror_ubuntu-bionic-kernel.git diff --git a/block/sed-opal.c b/block/sed-opal.c index 9ed51d0c6b1d..4f5e70d4abc3 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c @@ -877,7 +877,7 @@ static size_t response_get_string(const struct parsed_resp *resp, int n, return 0; } - if (n > resp->num) { + if (n >= resp->num) { pr_debug("Response has %d tokens. Can't access %d\n", resp->num, n); return 0; @@ -899,7 +899,7 @@ static u64 response_get_u64(const struct parsed_resp *resp, int n) return 0; } - if (n > resp->num) { + if (n >= resp->num) { pr_debug("Response has %d tokens. Can't access %d\n", resp->num, n); return 0;