pinctrl: ralink: rt2880: use 'PTR_ERR_OR_ZERO'

Avoid some boilerplate code using 'PTR_ERR_OR_ZERO'
 in probe function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201213161721.6514-8-sergio.paracuellos@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Sergio Paracuellos 2020-12-13 17:17:20 +01:00 committed by Linus Walleij
parent 8a55d64c33
commit 50a7108733

View File

@ -343,10 +343,8 @@ static int rt2880_pinmux_probe(struct platform_device *pdev)
return err;
}
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[] = {