summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/scsi/constants.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/scsi/constants.c')
-rw-r--r--kernel/drivers/scsi/constants.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/drivers/scsi/constants.c b/kernel/drivers/scsi/constants.c
index fa09d4be2..2b456ca69 100644
--- 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;
}