summaryrefslogtreecommitdiff
path: root/drivers/scsi/snic/snic_disc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-08-27 07:33:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-08-27 07:33:54 -0700
commit85eb043618bb17124050197d71c453d4a1f556e5 (patch)
treee86a9b1e85dae2e162a6abf877fa80af6322e02b /drivers/scsi/snic/snic_disc.c
parent28f20a19294da7df158dfca259d0e2b5866baaf9 (diff)
parent1bd3a76880b2bce017987cf53780b372cf59528e (diff)
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Three small driver fixes and one larger unused function set removal in the raid class (so no external impact)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: snic: Fix double free in snic_tgt_create() scsi: core: raid_class: Remove raid_component_add() scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5 scsi: ufs: mcq: Fix the search/wrap around logic
Diffstat (limited to 'drivers/scsi/snic/snic_disc.c')
-rw-r--r--drivers/scsi/snic/snic_disc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/snic/snic_disc.c b/drivers/scsi/snic/snic_disc.c
index e429ad23c396..4db3ba62fcd3 100644
--- a/drivers/scsi/snic/snic_disc.c
+++ b/drivers/scsi/snic/snic_disc.c
@@ -303,12 +303,11 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)
"Snic Tgt: device_add, with err = %d\n",
ret);
- put_device(&tgt->dev);
put_device(&snic->shost->shost_gendev);
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;