Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60a1aa50 authored by Viresh Kumar's avatar Viresh Kumar Committed by Wim Van Sebroeck
Browse files

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: default avatarViresh Kumar <viresh.kumar@st.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 75f5a536
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -347,16 +347,16 @@ 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;

	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);
					"cannot register IRQ%d for watchdog\n",
					wdt->irq);
			return ret;
		}
	}

	wdt->base = devm_ioremap(wdt->dev, res->start, resource_size(res));
	if (!wdt->base)