watchdog: s3c2410_wdt - Fix on handling of the request_mem_region fail
authorBanajit Goswami <banajit.g@samsung.com>
Thu, 20 May 2010 10:58:25 +0000 (11:58 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 25 May 2010 09:06:21 +0000 (09:06 +0000)
If the request for wdt_mem region fails, this patch modifies the driver
such that, it does not try to release the wdt_mem region on exit.

Signed-off-by: Banajit Goswami <banajit.g@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/s3c2410_wdt.c

index 095cbf38eb5d726fc00f11c8bc23f20913ba1745..300932580ded93e26e38f3dfaa1c0583d0b89976 100644 (file)
@@ -426,8 +426,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
        wdt_mem = request_mem_region(res->start, size, pdev->name);
        if (wdt_mem == NULL) {
                dev_err(dev, "failed to get memory region\n");
-               ret = -ENOENT;
-               goto err_req;
+               return -EBUSY;
        }
 
        wdt_base = ioremap(res->start, size);