Skip to content

Commit d81889c

Browse files
Dan CarpenterLinus Walleij
authored andcommitted
pinctrl: nuvoton: ma35d1: Fix an IS_ERR() vs NULL check
The fwnode_iomap() function doesn't return error pointers, it returns NULL. It's the same as of_iomap() in that way. Update the check accordingly. Fixes: ecc5bf8 ("pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/840152f9-d3bb-410e-8164-4c5043e1983e@moroto.mountain Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 5224b7a commit d81889c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pinctrl/nuvoton/pinctrl-ma35.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,8 @@ static int ma35_gpiolib_register(struct platform_device *pdev, struct ma35_pinct
571571
static int ma35_get_bank_data(struct ma35_pin_bank *bank)
572572
{
573573
bank->reg_base = fwnode_iomap(bank->fwnode, 0);
574-
if (IS_ERR(bank->reg_base))
575-
return PTR_ERR(bank->reg_base);
574+
if (!bank->reg_base)
575+
return -ENOMEM;
576576

577577
bank->irq = fwnode_irq_get(bank->fwnode, 0);
578578

0 commit comments

Comments
 (0)