* [PATCH] pinctrl: bcm: use PTR_ERR_OR_ZERO() to simplify code
@ 2025-08-12 8:12 Xichao Zhao
2025-08-19 10:14 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Xichao Zhao @ 2025-08-12 8:12 UTC (permalink / raw)
To: linus.walleij; +Cc: linux-gpio, linux-kernel, Xichao Zhao
Use the standard error pointer macro to shorten the code and simplify.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
drivers/pinctrl/bcm/pinctrl-bcm6358.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm6358.c b/drivers/pinctrl/bcm/pinctrl-bcm6358.c
index 891de49d76e7..4c8cd65fc31e 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm6358.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm6358.c
@@ -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[] = {
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: bcm: use PTR_ERR_OR_ZERO() to simplify code
2025-08-12 8:12 [PATCH] pinctrl: bcm: use PTR_ERR_OR_ZERO() to simplify code Xichao Zhao
@ 2025-08-19 10:14 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2025-08-19 10:14 UTC (permalink / raw)
To: Xichao Zhao; +Cc: linux-gpio, linux-kernel
On Tue, Aug 12, 2025 at 10:12 AM Xichao Zhao <zhao.xichao@vivo.com> wrote:
> Use the standard error pointer macro to shorten the code and simplify.
>
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-19 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 8:12 [PATCH] pinctrl: bcm: use PTR_ERR_OR_ZERO() to simplify code Xichao Zhao
2025-08-19 10:14 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).