projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'v4.4.27' into linux-linaro-lsk-v4.4
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
scsi
/
constants.c
diff --git
a/drivers/scsi/constants.c
b/drivers/scsi/constants.c
index fa09d4be2b5341436dba4e61c733543de7da57e9..2b456ca69d5c5dbafc2394074ad51e325d9f933d 100644
(file)
--- a/
drivers/scsi/constants.c
+++ b/
drivers/scsi/constants.c
@@
-1181,8
+1181,9
@@
static const char * const snstext[] = {
/* Get sense key string or NULL if not available */
const char *
-scsi_sense_key_string(unsigned char key) {
- if (key <= 0xE)
+scsi_sense_key_string(unsigned char key)
+{
+ if (key < ARRAY_SIZE(snstext))
return snstext[key];
return NULL;
}