ioremap balanced with iounmap for drivers/scsi/amiga7xx.c
PATCH 23/36 ioremap balanced with iounmap for drivers/scsi/amiga7xx.c
From: Amol Lad <[email protected]>
ioremap must be balanced by an iounmap and failing to do so can result in a memory leak.
Signed-off-by Amol Lad <[email protected]>
Cc James Bottomley <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/amiga7xx.c | 2 ++ 1 files changed, 2 insertions(+)
drivers/scsi/amiga7xx.c renamed from drivers/scsi/amiga7xx.c~ioremap-balanced-with-iounmap-drivers-scsi-amiga7xxc +2 -0
@@ -115,6 +115,8 @@ static int amiga7xx_release(struct Scsi_free_irq (shost->irq,NULL );if (shost->dma_channel !=0xff )free_dma (shost->dma_channel); +if (shost->base) +z_iounmap ((void *)shost->base);if (shost->io_port && shost->n_io_port)release_region (shost->io_port, shost->n_io_port);scsi_unregister (shost);
_