Skip to contentSkip to conversation

watchdog: bcm47xx_wdt: Don't validate platform data on remove

PATCH New Guenter Roeck 1 participant 1 message Jan 6, 2017 Watchdog device drivers

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 drivers/watchdog/bcm47xx_wdt.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/watchdog/bcm47xx_wdt.c +0 -3
index a1900b9ab6c4..35725e21b18a 100644
@@ -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;
Signature · 1 line
2.7.4