Commit 37ab5e1c authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fixups for error path on sc1200 wdog

parent 32f05867
...@@ -245,13 +245,18 @@ static int __init scx200_wdt_init(void) ...@@ -245,13 +245,18 @@ static int __init scx200_wdt_init(void)
sema_init(&open_semaphore, 1); sema_init(&open_semaphore, 1);
r = misc_register(&scx200_wdt_miscdev); r = misc_register(&scx200_wdt_miscdev);
if (r) if (r) {
release_region(SCx200_CB_BASE + SCx200_WDT_OFFSET,
SCx200_WDT_SIZE);
return r; return r;
}
r = register_reboot_notifier(&scx200_wdt_notifier); r = register_reboot_notifier(&scx200_wdt_notifier);
if (r) { if (r) {
printk(KERN_ERR NAME ": unable to register reboot notifier"); printk(KERN_ERR NAME ": unable to register reboot notifier");
misc_deregister(&scx200_wdt_miscdev); misc_deregister(&scx200_wdt_miscdev);
release_region(SCx200_CB_BASE + SCx200_WDT_OFFSET,
SCx200_WDT_SIZE);
return r; return r;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment