[PATCH 4.2 037/258] watchdog: imgpdc: Unregister restart handler on remove

From: Greg Kroah-Hartman
Date: Sun Oct 18 2015 - 00:52:33 EST


4.2-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxxxxxxxxx>

commit 8a340dbbc4b10fe07a924e91979bfc93e966dd65 upstream.

Commit c631f20068 ("watchdog: imgpdc: Add reboot support") introduced
a restart handler but forgot to unregister it on driver removal. Fix it.

Fixes: c631f20068 ("watchdog: imgpdc: Add reboot support")
Reported-by: Ariel D'Alessandro <ariel@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Wim Van Sebroeck <wim@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/watchdog/imgpdc_wdt.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/watchdog/imgpdc_wdt.c
+++ b/drivers/watchdog/imgpdc_wdt.c
@@ -316,6 +316,7 @@ static int pdc_wdt_remove(struct platfor
{
struct pdc_wdt_dev *pdc_wdt = platform_get_drvdata(pdev);

+ unregister_restart_handler(&pdc_wdt->restart_handler);
pdc_wdt_stop(&pdc_wdt->wdt_dev);
watchdog_unregister_device(&pdc_wdt->wdt_dev);
clk_disable_unprepare(pdc_wdt->wdt_clk);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/