diff options
-rw-r--r-- | drivers/scsi/scsi_scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 012f73a96880..60b262d66b5b 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -1339,8 +1339,10 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, | |||
1339 | sdev = scsi_alloc_sdev(starget, 0, NULL); | 1339 | sdev = scsi_alloc_sdev(starget, 0, NULL); |
1340 | if (!sdev) | 1340 | if (!sdev) |
1341 | return 0; | 1341 | return 0; |
1342 | if (scsi_device_get(sdev)) | 1342 | if (scsi_device_get(sdev)) { |
1343 | __scsi_remove_device(sdev); | ||
1343 | return 0; | 1344 | return 0; |
1345 | } | ||
1344 | } | 1346 | } |
1345 | 1347 | ||
1346 | sprintf(devname, "host %d channel %d id %d", | 1348 | sprintf(devname, "host %d channel %d id %d", |