pinctrl: bcm: use PTR_ERR_OR_ZERO() to simplify code

Use the standard error pointer macro to shorten the code and simplify.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://lore.kernel.org/20250812081243.22659-1-zhao.xichao@vivo.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Xichao Zhao 2025-08-12 16:12:43 +08:00 committed by Linus Walleij
parent 4b4dbf0f26
commit faba66cfce

View file

@ -343,10 +343,8 @@ static int bcm6358_pinctrl_probe(struct platform_device *pdev)
pc = platform_get_drvdata(pdev);
priv->overlays = devm_regmap_field_alloc(dev, pc->regs, overlays);
if (IS_ERR(priv->overlays))
return PTR_ERR(priv->overlays);
return 0;
return PTR_ERR_OR_ZERO(priv->overlays);
}
static const struct of_device_id bcm6358_pinctrl_match[] = {