Commit 50a71087 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Linus Walleij

pinctrl: ralink: rt2880: use 'PTR_ERR_OR_ZERO'

 Avoid some boilerplate code using 'PTR_ERR_OR_ZERO'
 in probe function.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201213161721.6514-8-sergio.paracuellos@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8a55d64c
...@@ -343,10 +343,8 @@ static int rt2880_pinmux_probe(struct platform_device *pdev) ...@@ -343,10 +343,8 @@ static int rt2880_pinmux_probe(struct platform_device *pdev)
return err; return err;
} }
dev = pinctrl_register(p->desc, &pdev->dev, p); dev = pinctrl_register(p->desc, &pdev->dev, p);
if (IS_ERR(dev))
return PTR_ERR(dev);
return 0; return PTR_ERR_OR_ZERO(dev);
} }
static const struct of_device_id rt2880_pinmux_match[] = { static const struct of_device_id rt2880_pinmux_match[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment