From: Wim Van Sebroeck Date: Mon, 31 Aug 2009 13:49:14 +0000 (+0000) Subject: [WATCHDOG] ar7_wdt: Fix error handling during probe. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7e9791bc1cbf635f13859216a825af5199a2061;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [WATCHDOG] ar7_wdt: Fix error handling during probe. Fix error handling in the probe function. Signed-off-by: Wim Van Sebroeck Tested-by: Florian Fainelli --- 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) 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;