forked from Minki/linux
scsi: zorro7xx: Fix a resource leak in zorro7xx_remove_one()
The error handling path of the probe releases a resource that is not freed
in the remove function. In some cases, a ioremap() must be undone.
Add the missing iounmap() call in the remove function.
Link: https://lore.kernel.org/r/247066a3104d25f9a05de8b3270fc3c848763bcc.1647673264.git.christophe.jaillet@wanadoo.fr
Fixes: 45804fbb00
("[SCSI] 53c700: Amiga Zorro NCR53c710 SCSI")
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
37a9bd7090
commit
16ed828b87
@ -159,6 +159,8 @@ static void zorro7xx_remove_one(struct zorro_dev *z)
|
||||
scsi_remove_host(host);
|
||||
|
||||
NCR_700_release(host);
|
||||
if (host->base > 0x01000000)
|
||||
iounmap(hostdata->base);
|
||||
kfree(hostdata);
|
||||
free_irq(host->irq, host);
|
||||
zorro_release_device(z);
|
||||
|
Loading…
Reference in New Issue
Block a user