]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
watchdog: bcm47xx_wdt: Don't validate platform data on remove
authorGuenter Roeck <linux@roeck-us.net>
Fri, 6 Jan 2017 14:35:16 +0000 (06:35 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 24 Feb 2017 22:00:23 +0000 (14:00 -0800)
Platform data was already validated in the probe function. If it was NULL,
the remove function will never be called. Remove the unnecessary check.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/bcm47xx_wdt.c

index a1900b9ab6c4e651b799f39b6c0f80ae62657d05..35725e21b18a609d267b5dfd49ce4dcc803133af 100644 (file)
@@ -226,9 +226,6 @@ static int bcm47xx_wdt_remove(struct platform_device *pdev)
 {
        struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev);
 
-       if (!wdt)
-               return -ENXIO;
-
        watchdog_unregister_device(&wdt->wdd);
 
        return 0;