]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/misc/mei/wd.c
watchdog: mei: avoid oops in watchdog unregister code path
[~shefty/rdma-dev.git] / drivers / misc / mei / wd.c
index 636409f9667f397c7ea3ea972fda636cf171e81d..9299a8c29a6fbe4846a06647955ea864ea1921de 100644 (file)
@@ -370,7 +370,7 @@ void mei_watchdog_register(struct mei_device *dev)
 
 void mei_watchdog_unregister(struct mei_device *dev)
 {
-       if (test_bit(WDOG_UNREGISTERED, &amt_wd_dev.status))
+       if (watchdog_get_drvdata(&amt_wd_dev) == NULL)
                return;
 
        watchdog_set_drvdata(&amt_wd_dev, NULL);