Commit 0f3d6791 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Martin K. Petersen

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: 1dc09e12 ("scsi: aha1740: stop using scsi_unregister")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1b72e86d
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment