aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/rio/rio_linux.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index 7ac68cb3bedd..e79b2ede8510 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -1026,6 +1026,7 @@ static int __init rio_init(void)
1026 found++; 1026 found++;
1027 } else { 1027 } else {
1028 iounmap(p->RIOHosts[p->RIONumHosts].Caddr); 1028 iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
1029 p->RIOHosts[p->RIONumHosts].Caddr = NULL;
1029 } 1030 }
1030 } 1031 }
1031 1032
@@ -1078,6 +1079,7 @@ static int __init rio_init(void)
1078 found++; 1079 found++;
1079 } else { 1080 } else {
1080 iounmap(p->RIOHosts[p->RIONumHosts].Caddr); 1081 iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
1082 p->RIOHosts[p->RIONumHosts].Caddr = NULL;
1081 } 1083 }
1082#else 1084#else
1083 printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n"); 1085 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 } 1119 }
1118 } 1120 }
1119 1121
1120 if (!okboard) 1122 if (!okboard) {
1121 iounmap(hp->Caddr); 1123 iounmap(hp->Caddr);
1124 hp->Caddr = NULL;
1125 }
1122 } 1126 }
1123 } 1127 }
1124 1128
@@ -1188,6 +1192,8 @@ static void __exit rio_exit(void)
1188 } 1192 }
1189 /* It is safe/allowed to del_timer a non-active timer */ 1193 /* It is safe/allowed to del_timer a non-active timer */
1190 del_timer(&hp->timer); 1194 del_timer(&hp->timer);
1195 if (hp->Caddr)
1196 iounmap(hp->Caddr);
1191 if (hp->Type == RIO_PCI) 1197 if (hp->Type == RIO_PCI)
1192 pci_dev_put(hp->pdev); 1198 pci_dev_put(hp->pdev);
1193 } 1199 }