Driver core clears the driver data to NULL after device_release
or on probe failure, so just remove it from here.

Driver core change:
"device-core: Ensure drvdata = NULL when no driver is bound"
(sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)

Signed-off-by: Michal Simek <michal.si...@xilinx.com>
---
 drivers/watchdog/sp805_wdt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 58df98a..3f786ce 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -268,7 +268,6 @@ static int sp805_wdt_remove(struct amba_device *adev)
        struct sp805_wdt *wdt = amba_get_drvdata(adev);

        watchdog_unregister_device(&wdt->wdd);
-       amba_set_drvdata(adev, NULL);
        watchdog_set_drvdata(&wdt->wdd, NULL);

        return 0;
--
1.8.2.3

Attachment: pgp6FmnULyBkd.pgp
Description: PGP signature

Reply via email to