Skip to content

Commit

Permalink
[PATCH] ioremap balanced with iounmap for drivers/char/rio/rio_linux.c
Browse files Browse the repository at this point in the history
Signed-off-by: Amol Lad <[email protected]>
Acked-by: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Amol Lad authored and Linus Torvalds committed Dec 7, 2006
1 parent 238b872 commit 8684265
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/char/rio/rio_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@ static int __init rio_init(void)
found++;
} else {
iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
p->RIOHosts[p->RIONumHosts].Caddr = NULL;
}
}

Expand Down Expand Up @@ -1078,6 +1079,7 @@ static int __init rio_init(void)
found++;
} else {
iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
p->RIOHosts[p->RIONumHosts].Caddr = NULL;
}
#else
printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n");
Expand Down Expand Up @@ -1117,8 +1119,10 @@ static int __init rio_init(void)
}
}

if (!okboard)
if (!okboard) {
iounmap(hp->Caddr);
hp->Caddr = NULL;
}
}
}

Expand Down Expand Up @@ -1188,6 +1192,8 @@ static void __exit rio_exit(void)
}
/* It is safe/allowed to del_timer a non-active timer */
del_timer(&hp->timer);
if (hp->Caddr)
iounmap(hp->Caddr);
if (hp->Type == RIO_PCI)
pci_dev_put(hp->pdev);
}
Expand Down

0 comments on commit 8684265

Please sign in to comment.