diff options
Diffstat (limited to 'block/sed-opal.c')
-rw-r--r-- | block/sed-opal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c index 945f4b8610e0..e0de4dd448b3 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, | |||
877 | return 0; | 877 | return 0; |
878 | } | 878 | } |
879 | 879 | ||
880 | if (n > resp->num) { | 880 | if (n >= resp->num) { |
881 | pr_debug("Response has %d tokens. Can't access %d\n", | 881 | pr_debug("Response has %d tokens. Can't access %d\n", |
882 | resp->num, n); | 882 | resp->num, n); |
883 | return 0; | 883 | return 0; |
@@ -916,7 +916,7 @@ static u64 response_get_u64(const struct parsed_resp *resp, int n) | |||
916 | return 0; | 916 | return 0; |
917 | } | 917 | } |
918 | 918 | ||
919 | if (n > resp->num) { | 919 | if (n >= resp->num) { |
920 | pr_debug("Response has %d tokens. Can't access %d\n", | 920 | pr_debug("Response has %d tokens. Can't access %d\n", |
921 | resp->num, n); | 921 | resp->num, n); |
922 | return 0; | 922 | return 0; |