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, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 38518b088073..c992ecf4e372 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -459,8 +459,7 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
459 found_target->reap_ref++; 459 found_target->reap_ref++;
460 spin_unlock_irqrestore(shost->host_lock, flags); 460 spin_unlock_irqrestore(shost->host_lock, flags);
461 if (found_target->state != STARGET_DEL) { 461 if (found_target->state != STARGET_DEL) {
462 put_device(parent); 462 put_device(dev);
463 kfree(starget);
464 return found_target; 463 return found_target;
465 } 464 }
466 /* Unfortunately, we found a dying target; need to 465 /* Unfortunately, we found a dying target; need to