diff options
Diffstat (limited to 'drivers/char/watchdog/s3c2410_wdt.c')
-rw-r--r-- | drivers/char/watchdog/s3c2410_wdt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/watchdog/s3c2410_wdt.c b/drivers/char/watchdog/s3c2410_wdt.c index 68b1ca976d53..18cb050c3862 100644 --- a/drivers/char/watchdog/s3c2410_wdt.c +++ b/drivers/char/watchdog/s3c2410_wdt.c | |||
@@ -380,18 +380,21 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
380 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 380 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
381 | if (res == NULL) { | 381 | if (res == NULL) { |
382 | printk(KERN_INFO PFX "failed to get irq resource\n"); | 382 | printk(KERN_INFO PFX "failed to get irq resource\n"); |
383 | iounmap(wdt_base); | ||
383 | return -ENOENT; | 384 | return -ENOENT; |
384 | } | 385 | } |
385 | 386 | ||
386 | ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, pdev); | 387 | ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, pdev); |
387 | if (ret != 0) { | 388 | if (ret != 0) { |
388 | printk(KERN_INFO PFX "failed to install irq (%d)\n", ret); | 389 | printk(KERN_INFO PFX "failed to install irq (%d)\n", ret); |
390 | iounmap(wdt_base); | ||
389 | return ret; | 391 | return ret; |
390 | } | 392 | } |
391 | 393 | ||
392 | wdt_clock = clk_get(&pdev->dev, "watchdog"); | 394 | wdt_clock = clk_get(&pdev->dev, "watchdog"); |
393 | if (wdt_clock == NULL) { | 395 | if (wdt_clock == NULL) { |
394 | printk(KERN_INFO PFX "failed to find watchdog clock source\n"); | 396 | printk(KERN_INFO PFX "failed to find watchdog clock source\n"); |
397 | iounmap(wdt_base); | ||
395 | return -ENOENT; | 398 | return -ENOENT; |
396 | } | 399 | } |
397 | 400 | ||
@@ -415,6 +418,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
415 | if (ret) { | 418 | if (ret) { |
416 | printk (KERN_ERR PFX "cannot register miscdev on minor=%d (%d)\n", | 419 | printk (KERN_ERR PFX "cannot register miscdev on minor=%d (%d)\n", |
417 | WATCHDOG_MINOR, ret); | 420 | WATCHDOG_MINOR, ret); |
421 | iounmap(wdt_base); | ||
418 | return ret; | 422 | return ret; |
419 | } | 423 | } |
420 | 424 | ||
@@ -451,6 +455,7 @@ static int s3c2410wdt_remove(struct platform_device *dev) | |||
451 | wdt_clock = NULL; | 455 | wdt_clock = NULL; |
452 | } | 456 | } |
453 | 457 | ||
458 | iounmap(wdt_base); | ||
454 | misc_deregister(&s3c2410wdt_miscdev); | 459 | misc_deregister(&s3c2410wdt_miscdev); |
455 | return 0; | 460 | return 0; |
456 | } | 461 | } |