Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
drivers
/
scsi
/
constants.c
diff --git
a/kernel/drivers/scsi/constants.c
b/kernel/drivers/scsi/constants.c
index
fa09d4b
..
2b456ca
100644
(file)
--- a/
kernel/drivers/scsi/constants.c
+++ b/
kernel/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;
}