Previously the driver was not checking if the optional interrupt
parameters were in the devicetree and was trying to register
an interrupt handler no matter what. The driver has been changed
to only register an interrupt handler if the interrupt information
is present.
Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
/* Register the interrupt */
prop = of_get_property(pdev->dev.of_node, "reset", NULL);
wdt->rst = prop ? be32_to_cpup(prop) : 0;
- if (!wdt->rst) {
- irq = platform_get_irq(pdev, 0);
+ irq = platform_get_irq(pdev, 0);
+ if (!wdt->rst && irq >= 0) {
res = request_irq(irq, xwdtps_irq_handler, 0, pdev->name, pdev);
if (res != 0) {
dev_err(&pdev->dev, "cannot register interrupt handler err=%d\n",