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 b36a04ae9ab8..d54d0efe0756 100644 --- a/drivers/char/watchdog/s3c2410_wdt.c +++ b/drivers/char/watchdog/s3c2410_wdt.c | |||
@@ -381,18 +381,21 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
381 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 381 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
382 | if (res == NULL) { | 382 | if (res == NULL) { |
383 | printk(KERN_INFO PFX "failed to get irq resource\n"); | 383 | printk(KERN_INFO PFX "failed to get irq resource\n"); |
384 | iounmap(wdt_base); | ||
384 | return -ENOENT; | 385 | return -ENOENT; |
385 | } | 386 | } |
386 | 387 | ||
387 | ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, pdev); | 388 | ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, pdev); |
388 | if (ret != 0) { | 389 | if (ret != 0) { |
389 | printk(KERN_INFO PFX "failed to install irq (%d)\n", ret); | 390 | printk(KERN_INFO PFX "failed to install irq (%d)\n", ret); |
391 | iounmap(wdt_base); | ||
390 | return ret; | 392 | return ret; |
391 | } | 393 | } |
392 | 394 | ||
393 | wdt_clock = clk_get(&pdev->dev, "watchdog"); | 395 | wdt_clock = clk_get(&pdev->dev, "watchdog"); |
394 | if (wdt_clock == NULL) { | 396 | if (wdt_clock == NULL) { |
395 | printk(KERN_INFO PFX "failed to find watchdog clock source\n"); | 397 | printk(KERN_INFO PFX "failed to find watchdog clock source\n"); |
398 | iounmap(wdt_base); | ||
396 | return -ENOENT; | 399 | return -ENOENT; |
397 | } | 400 | } |
398 | 401 | ||
@@ -416,6 +419,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
416 | if (ret) { | 419 | if (ret) { |
417 | printk (KERN_ERR PFX "cannot register miscdev on minor=%d (%d)\n", | 420 | printk (KERN_ERR PFX "cannot register miscdev on minor=%d (%d)\n", |
418 | WATCHDOG_MINOR, ret); | 421 | WATCHDOG_MINOR, ret); |
422 | iounmap(wdt_base); | ||
419 | return ret; | 423 | return ret; |
420 | } | 424 | } |
421 | 425 | ||
@@ -452,6 +456,7 @@ static int s3c2410wdt_remove(struct platform_device *dev) | |||
452 | wdt_clock = NULL; | 456 | wdt_clock = NULL; |
453 | } | 457 | } |
454 | 458 | ||
459 | iounmap(wdt_base); | ||
455 | misc_deregister(&s3c2410wdt_miscdev); | 460 | misc_deregister(&s3c2410wdt_miscdev); |
456 | return 0; | 461 | return 0; |
457 | } | 462 | } |