diff options
Diffstat (limited to 'drivers/char/watchdog/ibmasr.c')
-rw-r--r-- | drivers/char/watchdog/ibmasr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/char/watchdog/ibmasr.c b/drivers/char/watchdog/ibmasr.c index 8195f50..94155f6 100644 --- a/drivers/char/watchdog/ibmasr.c +++ b/drivers/char/watchdog/ibmasr.c @@ -367,18 +367,17 @@ static int __init ibmasr_init(void) if (!asr_type) return -ENODEV; + rc = asr_get_base_address(); + if (rc) + return rc; + rc = misc_register(&asr_miscdev); if (rc < 0) { + release_region(asr_base, asr_length); printk(KERN_ERR PFX "failed to register misc device\n"); return rc; } - rc = asr_get_base_address(); - if (rc) { - misc_deregister(&asr_miscdev); - return rc; - } - return 0; } |