aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r--drivers/char/watchdog/pnx4008_wdt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c
index d36a169c1b86..465dfd3ba61a 100644
--- a/drivers/char/watchdog/pnx4008_wdt.c
+++ b/drivers/char/watchdog/pnx4008_wdt.c
@@ -297,17 +297,17 @@ out:
297 297
298static int pnx4008_wdt_remove(struct platform_device *pdev) 298static int pnx4008_wdt_remove(struct platform_device *pdev)
299{ 299{
300 if (wdt_mem) { 300 misc_deregister(&pnx4008_wdt_miscdev);
301 release_resource(wdt_mem);
302 kfree(wdt_mem);
303 wdt_mem = NULL;
304 }
305 if (wdt_clk) { 301 if (wdt_clk) {
306 clk_set_rate(wdt_clk, 0); 302 clk_set_rate(wdt_clk, 0);
307 clk_put(wdt_clk); 303 clk_put(wdt_clk);
308 wdt_clk = NULL; 304 wdt_clk = NULL;
309 } 305 }
310 misc_deregister(&pnx4008_wdt_miscdev); 306 if (wdt_mem) {
307 release_resource(wdt_mem);
308 kfree(wdt_mem);
309 wdt_mem = NULL;
310 }
311 return 0; 311 return 0;
312} 312}
313 313