|
@@ -1339,8 +1339,10 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
|
|
|
sdev = scsi_alloc_sdev(starget, 0, NULL);
|
|
|
if (!sdev)
|
|
|
return 0;
|
|
|
- if (scsi_device_get(sdev))
|
|
|
+ if (scsi_device_get(sdev)) {
|
|
|
+ __scsi_remove_device(sdev);
|
|
|
return 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
sprintf(devname, "host %d channel %d id %d",
|