aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2009-08-31 09:49:14 -0400
committerWim Van Sebroeck <wim@iguana.be>2009-09-18 04:38:04 -0400
commitd7e9791bc1cbf635f13859216a825af5199a2061 (patch)
treea29d51d59d33b7e89054a3529344f2489cecf913
parent64d4062a3813e4816f31e2f49fd42129411975f8 (diff)
[WATCHDOG] ar7_wdt: Fix error handling during probe.
Fix error handling in the probe function. Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Tested-by: Florian Fainelli <florian@openwrt.org>
-rw-r--r--drivers/watchdog/ar7_wdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c
index 82855b063754..2e94b71b20d9 100644
--- a/drivers/watchdog/ar7_wdt.c
+++ b/drivers/watchdog/ar7_wdt.c
@@ -295,7 +295,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)
295 if (!ar7_wdt) { 295 if (!ar7_wdt) {
296 printk(KERN_ERR DRVNAME ": could not ioremap registers\n"); 296 printk(KERN_ERR DRVNAME ": could not ioremap registers\n");
297 rc = -ENXIO; 297 rc = -ENXIO;
298 goto out; 298 goto out_mem_region;
299 } 299 }
300 300
301 ar7_wdt_disable_wdt(); 301 ar7_wdt_disable_wdt();
@@ -311,6 +311,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)
311 311
312out_alloc: 312out_alloc:
313 iounmap(ar7_wdt); 313 iounmap(ar7_wdt);
314out_mem_region:
314 release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt)); 315 release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt));
315out: 316out:
316 return rc; 317 return rc;