]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/scsi.c
Merge tag 'platform-drivers-x86-v4.12-2' of git://git.infradead.org/linux-platform...
[karo-tx-linux.git] / drivers / scsi / scsi.c
index 7bfbcfa7af40b7df8bff2a0f38728621ee9f13e0..61cdd99ae41ec7e45a0cf0de604be4e169172368 100644 (file)
@@ -763,6 +763,8 @@ struct scsi_device *__scsi_device_lookup(struct Scsi_Host *shost,
        struct scsi_device *sdev;
 
        list_for_each_entry(sdev, &shost->__devices, siblings) {
+               if (sdev->sdev_state == SDEV_DEL)
+                       continue;
                if (sdev->channel == channel && sdev->id == id &&
                                sdev->lun ==lun)
                        return sdev;