watchdog: dw_wdt: Remove the un-necessary check after platform_get_resource()
authorGeorge Cherian <george.cherian@ti.com>
Tue, 10 Jun 2014 04:40:06 +0000 (10:10 +0530)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 5 Aug 2014 20:42:18 +0000 (22:42 +0200)
devm_ioremap_resource() checks for valid resource.
Remove the un-necessary check after platform_get_resource().

Signed-off-by: George Cherian <george.cherian@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/dw_wdt.c

index ee4f86ba83eca1856dc85a0ad777e11732e4e5ea..9f210299de2491cd9c9ed654268e0bda991a6c5e 100644 (file)
@@ -296,9 +296,6 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
        int ret;
        struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-       if (!mem)
-               return -EINVAL;
-
        dw_wdt.regs = devm_ioremap_resource(&pdev->dev, mem);
        if (IS_ERR(dw_wdt.regs))
                return PTR_ERR(dw_wdt.regs);