From 50a710873306ebe32b9a282051b2c1d0948368d3 Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Sun, 13 Dec 2020 17:17:20 +0100 Subject: 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 Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20201213161721.6514-8-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij --- drivers/pinctrl/ralink/pinctrl-rt2880.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/pinctrl/ralink/pinctrl-rt2880.c') diff --git a/drivers/pinctrl/ralink/pinctrl-rt2880.c b/drivers/pinctrl/ralink/pinctrl-rt2880.c index 273744245861..5a4e150482d5 100644 --- a/drivers/pinctrl/ralink/pinctrl-rt2880.c +++ b/drivers/pinctrl/ralink/pinctrl-rt2880.c @@ -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[] = { -- cgit v1.2.3