Message ID | 20170221183050.GB28595@mwanda (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On 02/21/2017 07:46 PM, Dan Carpenter wrote: > 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> > > diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c > index 4a7679f6c73d..f1578832ec7a 100644 > --- a/drivers/scsi/device_handler/scsi_dh_emc.c > +++ b/drivers/scsi/device_handler/scsi_dh_emc.c > @@ -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: Hannes Reinecke <hare@suse.com> Cheers, Hannes
>>>>> "Dan" == Dan Carpenter <dan.carpenter@oracle.com> writes:
Dan,
Dan> We accidentally return an uninitialized variable on success.
Applied to 4.11/scsi-fixes.
Thanks!
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 4a7679f6c73d..f1578832ec7a 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c @@ -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);
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>