From: Ezequiel Garcia Date: Thu, 23 Jul 2015 20:21:16 +0000 (-0300) Subject: watchdog: imgpdc: Unregister restart handler on remove X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~7483^2~23 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8a340dbbc4b10fe07a924e91979bfc93e966dd65;p=mirror_ubuntu-artful-kernel.git watchdog: imgpdc: Unregister restart handler on remove 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 Signed-off-by: Ezequiel Garcia Reviewed-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/imgpdc_wdt.c b/drivers/watchdog/imgpdc_wdt.c index 0f73621827ab..15ab07230960 100644 --- a/drivers/watchdog/imgpdc_wdt.c +++ b/drivers/watchdog/imgpdc_wdt.c @@ -316,6 +316,7 @@ static int pdc_wdt_remove(struct platform_device *pdev) { 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);