diff mbox series

[7/8] pinctrl: ralink: rt2880: use 'PTR_ERR_OR_ZERO'

Message ID 20201213161721.6514-8-sergio.paracuellos@gmail.com
State Accepted
Commit 50a710873306ebe32b9a282051b2c1d0948368d3
Headers show
Series pinctrl: ralink: rt2880: Some minimal clean ups | expand

Commit Message

Sergio Paracuellos Dec. 13, 2020, 4:17 p.m. UTC
Avoid some boilerplate code using 'PTR_ERR_OR_ZERO'
 in probe function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/pinctrl/ralink/pinctrl-rt2880.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/pinctrl/ralink/pinctrl-rt2880.c b/drivers/pinctrl/ralink/pinctrl-rt2880.c
index 5af1c8a20322..983da62ff3be 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[] = {