ioremap balanced with iounmap for drivers/scsi/nsp32.c
Subsystems (2)
PATCH 20/36 ioremap balanced with iounmap for drivers/scsi/nsp32.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/nsp32.c | 5 +++++ 1 files changed, 5 insertions(+)
drivers/scsi/nsp32.c renamed from drivers/scsi/nsp32.c~ioremap-balanced-with-iounmap-drivers-scsi-nsp32c +5 -0
@@ -3540,6 +3540,11 @@ static int __devinit nsp32_probe(structnsp32_dbg (NSP32_DEBUG_REGISTER ,"exit %d" , ret); +if (ret) { +iounmap (data->MmioAddress); + data->MmioAddress =NULL ; + } +return ret; }
_