mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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>
This commit is contained in:
parent
8a914f32e2
commit
36631157eb
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user