Fix error handling in the probe function.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Tested-by: Florian Fainelli <florian@openwrt.org>
if (!ar7_wdt) {
printk(KERN_ERR DRVNAME ": could not ioremap registers\n");
rc = -ENXIO;
if (!ar7_wdt) {
printk(KERN_ERR DRVNAME ": could not ioremap registers\n");
rc = -ENXIO;
out_alloc:
iounmap(ar7_wdt);
out_alloc:
iounmap(ar7_wdt);
release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt));
out:
return rc;
release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt));
out:
return rc;