mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
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:
parent
8a55d64c33
commit
50a7108733
|
|
@ -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[] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user