summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/snic/snic_disc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/snic/snic_disc.c')
-rw-r--r--drivers/scsi/snic/snic_disc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/snic/snic_disc.c b/drivers/scsi/snic/snic_disc.c
index 69c5e26a9..02b80291c 100644
--- a/drivers/scsi/snic/snic_disc.c
+++ b/drivers/scsi/snic/snic_disc.c
@@ -320,7 +320,7 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)
spin_lock_irqsave(snic->shost->host_lock, flags);
list_del(&tgt->list);
spin_unlock_irqrestore(snic->shost->host_lock, flags);
- kfree(tgt);
+ put_device(&tgt->dev);
tgt = NULL;
return tgt;