summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aha1740.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2020-02-28 22:59:48 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-27 02:10:53 +0100
commit0f3d679159f4cfb015abbb39e6031e79ccf64b05 (patch)
tree2ca7f10eb72132bbe55bf0544aaad882b180a965 /drivers/scsi/aha1740.c
parentscsi: qla2xxx: Remove non functional code (diff)
downloadlinux-0f3d679159f4cfb015abbb39e6031e79ccf64b05.tar.xz
linux-0f3d679159f4cfb015abbb39e6031e79ccf64b05.zip
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: 1dc09e120c83 ("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>
Diffstat (limited to 'drivers/scsi/aha1740.c')
-rw-r--r--drivers/scsi/aha1740.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
index da4150c17781..5a227c03895f 100644
--- a/drivers/scsi/aha1740.c
+++ b/drivers/scsi/aha1740.c
@@ -592,7 +592,6 @@ static int aha1740_probe (struct device *dev)
DMA_BIDIRECTIONAL);
if (!host->ecb_dma_addr) {
printk (KERN_ERR "aha1740_probe: Couldn't map ECB, giving up\n");
- scsi_host_put (shpnt);
goto err_host_put;
}