mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
pinctrl: nuvoton: npcm8xx: Fix error handling in npcm8xx_gpio_fw()
fwnode_irq_get() was changed to not return 0, fix this by checking
for negative error, also update the error log.
Fixes: acf4884a57 ("pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver")
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/20250118031334.243324-1-yuehaibing@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
75b456278e
commit
d6c6fd77e5
|
|
@ -2361,8 +2361,8 @@ static int npcm8xx_gpio_fw(struct npcm8xx_pinctrl *pctrl)
|
|||
return dev_err_probe(dev, ret, "gpio-ranges fail for GPIO bank %u\n", id);
|
||||
|
||||
ret = fwnode_irq_get(child, 0);
|
||||
if (!ret)
|
||||
return dev_err_probe(dev, ret, "No IRQ for GPIO bank %u\n", id);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "Failed to retrieve IRQ for bank %u\n", id);
|
||||
|
||||
pctrl->gpio_bank[id].irq = ret;
|
||||
pctrl->gpio_bank[id].irq_chip = npcmgpio_irqchip;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user