Commit 86842654 authored by Amol Lad's avatar Amol Lad Committed by Linus Torvalds

[PATCH] ioremap balanced with iounmap for drivers/char/rio/rio_linux.c

Signed-off-by: default avatarAmol Lad <amol@verismonetworks.com>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 238b8721
...@@ -1026,6 +1026,7 @@ static int __init rio_init(void) ...@@ -1026,6 +1026,7 @@ static int __init rio_init(void)
found++; found++;
} else { } else {
iounmap(p->RIOHosts[p->RIONumHosts].Caddr); iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
p->RIOHosts[p->RIONumHosts].Caddr = NULL;
} }
} }
...@@ -1078,6 +1079,7 @@ static int __init rio_init(void) ...@@ -1078,6 +1079,7 @@ static int __init rio_init(void)
found++; found++;
} else { } else {
iounmap(p->RIOHosts[p->RIONumHosts].Caddr); iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
p->RIOHosts[p->RIONumHosts].Caddr = NULL;
} }
#else #else
printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n"); printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n");
...@@ -1117,8 +1119,10 @@ static int __init rio_init(void) ...@@ -1117,8 +1119,10 @@ static int __init rio_init(void)
} }
} }
if (!okboard) if (!okboard) {
iounmap(hp->Caddr); iounmap(hp->Caddr);
hp->Caddr = NULL;
}
} }
} }
...@@ -1188,6 +1192,8 @@ static void __exit rio_exit(void) ...@@ -1188,6 +1192,8 @@ static void __exit rio_exit(void)
} }
/* It is safe/allowed to del_timer a non-active timer */ /* It is safe/allowed to del_timer a non-active timer */
del_timer(&hp->timer); del_timer(&hp->timer);
if (hp->Caddr)
iounmap(hp->Caddr);
if (hp->Type == RIO_PCI) if (hp->Type == RIO_PCI)
pci_dev_put(hp->pdev); pci_dev_put(hp->pdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment