From 2d665b9cd361c4b6d100d3b1b5bdb6e0d1725486 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Tue, 13 Jan 2026 19:48:31 -0600 Subject: [PATCH] pinctrl: mediatek: ignored error return from pupd/r1/r0 Ignore the error return value from mtk_pinconf_bias_set_pupd_r1_r0(). The PUPD/R1/R0 registers only include a small subset of the pins, so it is normal for this function to return an error for most pins. Therefore, this error should not be propagated. This fixes not all pins in a pinmux group being configured in some cases because the propagated error caused the configuration loop to exit early. The rest of the function is refactored to return early on errors to improve readability. Signed-off-by: David Lechner --- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 0483d532800..ff7cefcc8de 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -364,11 +364,13 @@ int mtk_pinconf_bias_set_v1(struct udevice *dev, u32 pin, bool disable, /* set pupd_r1_r0 if pullen_pullsel succeeded */ err = mtk_pinconf_bias_set_pullen_pullsel(dev, pin, disable, pullup, val); - if (!err) - return mtk_pinconf_bias_set_pupd_r1_r0(dev, pin, disable, - pullup, val); + if (err) + return err; - return err; + /* Not all pins have PUPD/R1/R0 registers, so ignore any error here. */ + mtk_pinconf_bias_set_pupd_r1_r0(dev, pin, disable, pullup, val); + + return 0; } int mtk_pinconf_bias_set_pu_pd(struct udevice *dev, u32 pin, bool disable,