scsi: hpsa: clear tmpdevice in scan thread
authorScott Teel <scott.teel@microsemi.com>
Fri, 20 Oct 2017 21:51:20 +0000 (16:51 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 25 Oct 2017 08:55:17 +0000 (04:55 -0400)
clean up stale information.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c

index 76461c4..0330f17 100644 (file)
@@ -4258,6 +4258,8 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
                int phys_dev_index = i - (raid_ctlr_position == 0);
                bool skip_device = false;
 
+               memset(tmpdevice, 0, sizeof(*tmpdevice));
+
                physical_device = i < nphysicals + (raid_ctlr_position == 0);
 
                /* Figure out where the LUN ID info is coming from */