mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 15:36:55 +08:00
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:
committed by
Linus Walleij
parent
4b4dbf0f26
commit
faba66cfce
@@ -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[] = {
|
||||
|
||||
Reference in New Issue
Block a user