X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=block%2Fsed-opal.c;h=4f5e70d4abc3cd282db163c6614b24c31a4c0fe5;hb=6b54778562a27070673ad8bb9e011c89d9f1a849;hp=9ed51d0c6b1d171fc2eab785ef854b64f93721fe;hpb=39b540ec8df89bedb791c13f2042d4d2596fc653;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;