aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r--drivers/scsi/scsi_scan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 2e5fe584aad3..f55e5f166973 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1717,6 +1717,9 @@ static void scsi_sysfs_add_devices(struct Scsi_Host *shost)
1717{ 1717{
1718 struct scsi_device *sdev; 1718 struct scsi_device *sdev;
1719 shost_for_each_device(sdev, shost) { 1719 shost_for_each_device(sdev, shost) {
1720 /* target removed before the device could be added */
1721 if (sdev->sdev_state == SDEV_DEL)
1722 continue;
1720 if (!scsi_host_scan_allowed(shost) || 1723 if (!scsi_host_scan_allowed(shost) ||
1721 scsi_sysfs_add_sdev(sdev) != 0) 1724 scsi_sysfs_add_sdev(sdev) != 0)
1722 __scsi_remove_device(sdev); 1725 __scsi_remove_device(sdev);