[patch] scsi: missing braces in scsi_extd_sense_format()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There were missing curly braces so we always return the first
additional2[] string.

Fixes: 7046d2fa6dbd ('scsi: use sdev as argument for sense code printing')
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index a1a7fca..0cf43f6 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -1282,9 +1282,10 @@ scsi_extd_sense_format(unsigned char asc, unsigned char ascq, const char **fmt)
 	for (i = 0; additional2[i].fmt; i++) {
 		if (additional2[i].code1 == asc &&
 		    ascq >= additional2[i].code2_min &&
-		    ascq <= additional2[i].code2_max)
+		    ascq <= additional2[i].code2_max) {
 			*fmt = additional2[i].fmt;
 			return additional2[i].str;
+		}
 	}
 #endif
 	return NULL;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux