diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-03-12 09:52:00 +0530 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 20:14:20 +0200 |
commit | 60a1aa50b2ca142a91455203ca2aa09502eddd20 (patch) | |
tree | 64d3df187208d1cc87ceaedbd3ae77a86f408b81 /drivers/watchdog | |
parent | 75f5a536c0b605b9b8406325f51f62f67141973e (diff) |
watchdog: mpcore_wdt: Allow platform_get_irq() to fail
irq is not necessary for mpcore wdt. Don't return error if it is not passed. But
if it is passed, then request_irq must pass.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/mpcore_wdt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c index 2d8c0a006b8..7c741dc987b 100644 --- a/drivers/watchdog/mpcore_wdt.c +++ b/drivers/watchdog/mpcore_wdt.c @@ -347,15 +347,15 @@ static int __devinit mpcore_wdt_probe(struct platform_device *pdev) wdt->dev = &pdev->dev; wdt->irq = platform_get_irq(pdev, 0); - if (wdt->irq < 0) - return -ENXIO; - - ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0, - "mpcore_wdt", wdt); - if (ret) { - dev_printk(KERN_ERR, wdt->dev, - "cannot register IRQ%d for watchdog\n", wdt->irq); - return ret; + if (wdt->irq >= 0) { + ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0, + "mpcore_wdt", wdt); + if (ret) { + dev_printk(KERN_ERR, wdt->dev, + "cannot register IRQ%d for watchdog\n", + wdt->irq); + return ret; + } } wdt->base = devm_ioremap(wdt->dev, res->start, resource_size(res)); |