Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570673
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] scsi_dh_emc: fix uninitialized return value ret |
| Date | 2017-01-31 13:30 +0100 |
| Message-ID | <t5FJp-DW-41@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com>
ret is uninitialized on a successful execution of clarrion_std_inquiry
and a garbage return value is being returted. Fix this by setting ret
to zero on the success exit path.
Found by CoverityScan, CID#1398889 ("Uninitialized scaler variable")
Fixes: b78205c93297b8219 ("scsi_dh_emc: switch to scsi_execute_req_flags()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/device_handler/scsi_dh_emc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
index 4a7679f..6647da2 100644
--- a/drivers/scsi/device_handler/scsi_dh_emc.c
+++ b/drivers/scsi/device_handler/scsi_dh_emc.c
@@ -376,6 +376,7 @@ static int clariion_std_inquiry(struct scsi_device *sdev,
sdev_printk(KERN_INFO, sdev,
"%s: detected Clariion %s, flags %x\n",
CLARIION_NAME, sp_model, csdev->flags);
+ err = 0;
out:
return err;
}
--
2.10.2
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] scsi_dh_emc: fix uninitialized return value ret Colin King <colin.king@canonical.com> - 2017-01-31 13:30 +0100 Re: [PATCH] scsi_dh_emc: fix uninitialized return value ret walter harms <wharms@bfs.de> - 2017-01-31 13:50 +0100
csiph-web