[PATCH 24/36] pinctrl: mediatek: remove conditional return with no effect
Sang-Heon Jeon
ekffu200098 at gmail.com
Thu Jul 23 11:45:26 PDT 2026
Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.
This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.
Signed-off-by: Sang-Heon Jeon <ekffu200098 at gmail.com>
---
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
index 4918d38abfc2..a8ab982d8f21 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
@@ -1242,11 +1242,7 @@ int mtk_pinconf_adv_drive_set(struct mtk_pinctrl *hw,
if (err)
return err;
- err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DRV_E1, e1);
- if (err)
- return err;
-
- return err;
+ return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DRV_E1, e1);
}
EXPORT_SYMBOL_GPL(mtk_pinconf_adv_drive_set);
--
2.43.0
More information about the Linux-mediatek
mailing list