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 8195f5023d85..94155f6136c2 100644 --- a/drivers/char/watchdog/ibmasr.c +++ b/drivers/char/watchdog/ibmasr.c | |||
@@ -367,18 +367,17 @@ static int __init ibmasr_init(void) | |||
367 | if (!asr_type) | 367 | if (!asr_type) |
368 | return -ENODEV; | 368 | return -ENODEV; |
369 | 369 | ||
370 | rc = asr_get_base_address(); | ||
371 | if (rc) | ||
372 | return rc; | ||
373 | |||
370 | rc = misc_register(&asr_miscdev); | 374 | rc = misc_register(&asr_miscdev); |
371 | if (rc < 0) { | 375 | if (rc < 0) { |
376 | release_region(asr_base, asr_length); | ||
372 | printk(KERN_ERR PFX "failed to register misc device\n"); | 377 | printk(KERN_ERR PFX "failed to register misc device\n"); |
373 | return rc; | 378 | return rc; |
374 | } | 379 | } |
375 | 380 | ||
376 | rc = asr_get_base_address(); | ||
377 | if (rc) { | ||
378 | misc_deregister(&asr_miscdev); | ||
379 | return rc; | ||
380 | } | ||
381 | |||
382 | return 0; | 381 | return 0; |
383 | } | 382 | } |
384 | 383 | ||