scsi: scsi_dh_emc: return success in clariion_std_inquiry()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 21 Feb 2017 18:46:37 +0000 (21:46 +0300)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:18:39 +0000 (13:18 +0000)
commit 4d7d39a18b8b81511f0b893b7d2203790bf8a58b upstream.

We accidentally return an uninitialized variable on success.

Fixes: b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/scsi/device_handler/scsi_dh_emc.c

index e1c8be06de9de2f50dd608f0ec27f7bf81617adb..f94fcda1285d35e83e7e860c8386d99fb0ab2bb4 100644 (file)
@@ -464,7 +464,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;
 
        err = send_inquiry_cmd(sdev, 0, csdev);