]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: aha1740: Fix an errro handling path in aha1740_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 28 Feb 2020 21:59:48 +0000 (22:59 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 27 Mar 2020 01:10:53 +0000 (21:10 -0400)
commit7c6bda97052f0914f197d11faea818262d7583ad
tree2ca7f10eb72132bbe55bf0544aaad882b180a965
parent522444e3ee46a3619ca49a75c50e2d7823c55ba2
scsi: aha1740: Fix an errro handling path in aha1740_probe()

If 'dma_map_single()' fails, the ref counted 'shpnt' will be decremented
twice because 'scsi_host_put()' is called in the if block, and in the error
handling path.

Axe one of these calls.

Link: https://lore.kernel.org/r/20200228215948.7473-1-christophe.jaillet@wanadoo.fr
Fixes: 279a496973bd ("scsi: aha1740: stop using scsi_unregister")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aha1740.c