From: Lv Ruyi <lv.ruyi@xxxxxxxxxx> The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Fixes: cefc03e5995e ("pinctrl: Add Pistachio SoC pin control driver") Reported-by: Zeal Robot <zealci@xxxxxxxxxx> Signed-off-by: Lv Ruyi <lv.ruyi@xxxxxxxxxx> --- drivers/pinctrl/pinctrl-pistachio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-pistachio.c b/drivers/pinctrl/pinctrl-pistachio.c index 8d271c6b0ca4..ff34f9755368 100644 --- a/drivers/pinctrl/pinctrl-pistachio.c +++ b/drivers/pinctrl/pinctrl-pistachio.c @@ -1374,7 +1374,7 @@ static int pistachio_gpio_register(struct pistachio_pinctrl *pctl) } irq = irq_of_parse_and_map(child, 0); - if (irq < 0) { + if (!irq) { dev_err(pctl->dev, "No IRQ for bank %u: %d\n", i, irq); of_node_put(child); ret = irq; -- 2.25.1