Skip to contentSkip to conversation

scsi_dh_emc: return success in clariion_std_inquiry()

PATCH Applied Dan Carpenter 3 participants 3 messages Feb 21, 2017 – Feb 23, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_dh_emc: return success in clariion_std_inquiry()

We accidentally return an uninitialized variable on success.

Fixes b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler")
drivers/scsi/device_handler/scsi_dh_emc.c +1 -1
index 4a7679f6c73d..f1578832ec7a 100644
@@ -358,7 +358,7 @@ static int clariion_prep_fn(struct scsi_device *sdev, struct request *req)
 static int clariion_std_inquiry(struct scsi_device *sdev,
 				struct clariion_dh_data *csdev)
 {
-	int err;
+	int err = SCSI_DH_OK;
 	char *sp_model;
 
 	sp_model = parse_sp_model(sdev, sdev->inquiry);
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Dan Carpenter

We accidentally return an uninitialized variable on success.

Fixes b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler")
drivers/scsi/device_handler/scsi_dh_emc.c +0 -0
index 4a7679f6c73d..f1578832ec7a 100644

drivers/scsi/device_handler/scsi_dh_emc.c static int clariion_prep_fn(struct scsi_device *sdev, struct request *req) · line 364

Quoted 8 lines
drivers/scsi/device_handler/scsi_dh_emc.c +1 -1
@@ -358,7 +358,7 @@ static int clariion_prep_fn(struct scsi_device *sdev, struct request *req)
 static int clariion_std_inquiry(struct scsi_device *sdev,
 				struct clariion_dh_data *csdev)
 {
-	int err;
+	int err = SCSI_DH_OK;
 	char *sp_model;
 
 	sp_model = parse_sp_model(sdev, sdev->inquiry);

Cheers,

Hannes

Signature · 9 lines
Dr. Hannes Reinecke		   Teamlead Storage & Networking
[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to Dan Carpenter
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dan" = Dan Carpenter <[email protected]> writes:

Dan,

Dan> We accidentally return an uninitialized variable on success.

Applied to 4.11/scsi-fixes.

Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering