From: Scott Teel Date: Fri, 20 Oct 2017 21:51:20 +0000 (-0500) Subject: scsi: hpsa: clear tmpdevice in scan thread X-Git-Tag: v4.15-rc1~125^2~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=421bf80cc2e421ea8efd7bc47f595169d67ae92f;p=thirdparty%2Fkernel%2Flinux.git scsi: hpsa: clear tmpdevice in scan thread clean up stale information. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 76461c4cca0c9..0330f17c8feb1 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -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 */