[lkml]   [2019]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] scsi: aha1740: avoid a duplicated 'scsi_host_put()' call
If 'dma_map_single()' fails, 'scsi_host_put (shpnt)' will be called twice.
Once in the 'if' block, and once in the error handling path.
Axe one of this call.

Fixes: 1dc09e120c83 ("scsi: aha1740: stop using scsi_unregister")
Signed-off-by: Christophe JAILLET <>
I'm not sure of the commit used in the Fixes tag. This commit has made
obvious the redundant scsi_host_put call, but it was already hidden in
'scsi_unregister()' ('scsi_unregister()' is not part of the kernel anymore,
but see 4.8.17 for example:
drivers/scsi/aha1740.c | 1 -
1 file changed, 1 deletion(-)

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)
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;

 \ /
  Last update: 2019-12-26 16:36    [W:0.020 / U:2.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site