From: Guenter Roeck Date: Fri, 6 Jan 2017 14:35:16 +0000 (-0800) Subject: watchdog: bcm47xx_wdt: Don't validate platform data on remove X-Git-Tag: v4.11-rc1~66^2~40 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3b72c41f13e64e4799cb0978d46eb06575456f26;p=karo-tx-linux.git watchdog: bcm47xx_wdt: Don't validate platform data on remove 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 --- diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c index a1900b9ab6c4..35725e21b18a 100644 --- a/drivers/watchdog/bcm47xx_wdt.c +++ b/drivers/watchdog/bcm47xx_wdt.c @@ -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;