ioremap balanced with iounmap for drivers/scsi/ncr53c8xx.c
PATCH 21/45 ioremap balanced with iounmap for drivers/scsi/ncr53c8xx.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]>
Cc Alan Cox <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/ncr53c8xx.c | 2 ++ 1 files changed, 2 insertions(+)
drivers/scsi/ncr53c8xx.c renamed from drivers/scsi/ncr53c8xx.c~ioremap-balanced-with-iounmap-drivers-scsi-ncr53c8xxc +2 -0
@@ -8563,6 +8563,8 @@ struct Scsi_Host * __init ncr_attach(strm_free_dma (np->script0,sizeof (struct script ),"SCRIPT" );if (np->ccb)m_free_dma (np->ccb,sizeof (struct ccb ),"CCB" ); +if (!device->slot.base_v && np->vaddr) +iounmap (np->vaddr);m_free_dma (np,sizeof (struct ncb ),"NCB" ); host_data->ncb =NULL ;
_