Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=771cceb464874d4a22efd4a600e4597ad3f2fc9e
Commit:     771cceb464874d4a22efd4a600e4597ad3f2fc9e
Parent:     d17a18dd92c91c784fcf7c785fa6bbf178fd0a6d
Author:     Julia Lawall <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 17 16:20:02 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Dec 17 19:28:16 2007 -0800

    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]>
---
 drivers/macintosh/via-pmu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index dc741d3..6123c70 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -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;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to