summaryrefslogtreecommitdiff
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-05-22 09:39:03 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-06-18 19:46:23 -0400
commit36631157eb3ff8b0b359d574452ebb8f81370ec5 (patch)
treea36cd5fd2369f90c617240908abefa465b57ea63 /drivers/scsi/hpsa.c
parent8a914f32e2dfaff7f23002502ba64a2abb2a4a50 (diff)
scsi: hpsa: fix an uninitialized read and dereference of pointer dev
Currently the check for a lockup_detected failure exits via the label return_reset_status that reads and dereferences an uninitialized pointer dev. Fix this by ensuring dev is inintialized to null. Addresses-Coverity: ("Uninitialized pointer read") Fixes: 14991a5bade5 ("scsi: hpsa: correct device resets") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Don Brace <don.brace@microsemi.com> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index c560a4532733..ac8338b0571b 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -5947,7 +5947,7 @@ static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd)
int rc = SUCCESS;
int i;
struct ctlr_info *h;
- struct hpsa_scsi_dev_t *dev;
+ struct hpsa_scsi_dev_t *dev = NULL;
u8 reset_type;
char msg[48];
unsigned long flags;