Commit d7e9791b authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] ar7_wdt: Fix error handling during probe.

Fix error handling in the probe function.
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
Tested-by: default avatarFlorian Fainelli <florian@openwrt.org>
parent 64d4062a
......@@ -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();
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment