mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
drivers/macintosh/via-pmu.c: Added a missing iounmap
The error handling code should undo the ioremap as well. The problem was detected using the following semantic match (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T,T1,T2; identifier E; statement S; expression x1,x2; constant C; int ret; @@ T E; ... * E = ioremap(...); if (E == NULL) S ... when != iounmap(E) when != if (E != NULL) { ... iounmap(E); ...} when != x1 = (T1)E if (...) { ... when != iounmap(E) when != if (E != NULL) { ... iounmap(E); ...} when != x2 = (T2)E ( * return; | * return C; | * return ret; ) } // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Olaf Hering <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d17a18dd92
commit
771cceb464
1 changed files with 1 additions and 0 deletions
|
|
@ -2336,6 +2336,7 @@ powerbook_sleep_3400(void)
|
|||
ret = pmac_suspend_devices();
|
||||
if (ret) {
|
||||
pbook_free_pci_save();
|
||||
iounmap(mem_ctrl);
|
||||
printk(KERN_ERR "Sleep rejected by devices\n");
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue