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 <redacted>
---
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