aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/watchdog/pnx4008_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/watchdog/pnx4008_wdt.c')
-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:
static int pnx4008_wdt_remove(struct platform_device *pdev)
{
- if (wdt_mem) {
- release_resource(wdt_mem);
- kfree(wdt_mem);
- wdt_mem = NULL;
- }
+ misc_deregister(&pnx4008_wdt_miscdev);
if (wdt_clk) {
clk_set_rate(wdt_clk, 0);
clk_put(wdt_clk);
wdt_clk = NULL;
}
- misc_deregister(&pnx4008_wdt_miscdev);
+ if (wdt_mem) {
+ release_resource(wdt_mem);
+ kfree(wdt_mem);
+ wdt_mem = NULL;
+ }
return 0;
}