Commit 62033f29 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] janitor: sc520_wdt

Insert ioremap error check and adjust cleanup path accordingly.

From: Leann Ogasawara <ogasawara@osdl.org>
parent 9048d53d
...@@ -423,11 +423,18 @@ static int __init sc520_wdt_init(void) ...@@ -423,11 +423,18 @@ static int __init sc520_wdt_init(void)
wdtmrctl = (__u16 *)((char *)wdtmrctl + OFFS_WDTMRCTL); wdtmrctl = (__u16 *)((char *)wdtmrctl + OFFS_WDTMRCTL);
wdtmrctl = ioremap((unsigned long)wdtmrctl, 2); wdtmrctl = ioremap((unsigned long)wdtmrctl, 2);
if (!wdtmrctl) {
printk (KERN_ERR PFX "Unable to remap memory.\n");
rc = -ENOMEM;
goto err_out_notifier;
}
printk(KERN_INFO PFX "WDT driver for SC520 initialised. timeout=%d sec (nowayout=%d)\n", printk(KERN_INFO PFX "WDT driver for SC520 initialised. timeout=%d sec (nowayout=%d)\n",
timeout,nowayout); timeout,nowayout);
return 0; return 0;
err_out_notifier:
unregister_reboot_notifier(&wdt_notifier);
err_out_miscdev: err_out_miscdev:
misc_deregister(&wdt_miscdev); misc_deregister(&wdt_miscdev);
err_out_region2: err_out_region2:
......
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