Skip to content

Commit

Permalink
[WATCHDOG] ar7_wdt: Fix error handling during probe.
Browse files Browse the repository at this point in the history
Fix error handling in the probe function.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Tested-by: Florian Fainelli <florian@openwrt.org>
  • Loading branch information
Wim Van Sebroeck committed Sep 18, 2009
1 parent 64d4062 commit d7e9791
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/watchdog/ar7_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)
if (!ar7_wdt) {
printk(KERN_ERR DRVNAME ": could not ioremap registers\n");
rc = -ENXIO;
goto out;
goto out_mem_region;
}

ar7_wdt_disable_wdt();
Expand All @@ -311,6 +311,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)

out_alloc:
iounmap(ar7_wdt);
out_mem_region:
release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt));
out:
return rc;
Expand Down

0 comments on commit d7e9791

Please sign in to comment.