diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2020-12-13 17:17:20 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-01-04 15:38:35 +0100 |
commit | 50a710873306ebe32b9a282051b2c1d0948368d3 (patch) | |
tree | 2ce8e02c42c03b8cbcac774b538768d812876753 /drivers/pinctrl/ralink/pinctrl-rt2880.c | |
parent | pinctrl: ralink: rt2880: preserve error codes (diff) | |
download | linux-50a710873306ebe32b9a282051b2c1d0948368d3.tar.xz linux-50a710873306ebe32b9a282051b2c1d0948368d3.zip |
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>
Diffstat (limited to 'drivers/pinctrl/ralink/pinctrl-rt2880.c')
-rw-r--r-- | drivers/pinctrl/ralink/pinctrl-rt2880.c | 4 |
1 files changed, 1 insertions, 3 deletions
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[] = { |