[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>
This commit is contained in:
parent
64d4062a38
commit
d7e9791bc1
1 changed files with 2 additions and 1 deletions
|
@ -295,7 +295,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)
|
||||||
if (!ar7_wdt) {
|
if (!ar7_wdt) {
|
||||||
printk(KERN_ERR DRVNAME ": could not ioremap registers\n");
|
printk(KERN_ERR DRVNAME ": could not ioremap registers\n");
|
||||||
rc = -ENXIO;
|
rc = -ENXIO;
|
||||||
goto out;
|
goto out_mem_region;
|
||||||
}
|
}
|
||||||
|
|
||||||
ar7_wdt_disable_wdt();
|
ar7_wdt_disable_wdt();
|
||||||
|
@ -311,6 +311,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
out_alloc:
|
out_alloc:
|
||||||
iounmap(ar7_wdt);
|
iounmap(ar7_wdt);
|
||||||
|
out_mem_region:
|
||||||
release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt));
|
release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt));
|
||||||
out:
|
out:
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue