diff options
-rw-r--r-- | drivers/macintosh/via-pmu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index dda03985dcf5..5710e01cef10 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -336,8 +336,10 @@ int __init find_via_pmu(void) | |||
336 | if (gaddr != OF_BAD_ADDR) | 336 | if (gaddr != OF_BAD_ADDR) |
337 | gpio_reg = ioremap(gaddr, 0x10); | 337 | gpio_reg = ioremap(gaddr, 0x10); |
338 | } | 338 | } |
339 | if (gpio_reg == NULL) | 339 | if (gpio_reg == NULL) { |
340 | printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n"); | 340 | printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n"); |
341 | goto fail_gpio; | ||
342 | } | ||
341 | } else | 343 | } else |
342 | pmu_kind = PMU_UNKNOWN; | 344 | pmu_kind = PMU_UNKNOWN; |
343 | 345 | ||
@@ -365,6 +367,9 @@ int __init find_via_pmu(void) | |||
365 | return 1; | 367 | return 1; |
366 | fail: | 368 | fail: |
367 | of_node_put(vias); | 369 | of_node_put(vias); |
370 | iounmap(gpio_reg); | ||
371 | gpio_reg = NULL; | ||
372 | fail_gpio: | ||
368 | vias = NULL; | 373 | vias = NULL; |
369 | return 0; | 374 | return 0; |
370 | } | 375 | } |