pinctrl: mediatek: simplify the return expression of mtk_pinconf_bias_disable_set_rev1()
authorZheng Yongjun <zhengyongjun3@huawei.com>
Thu, 10 Dec 2020 13:59:02 +0000 (21:59 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 12 Dec 2020 00:39:38 +0000 (01:39 +0100)
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201210135902.1548-1-zhengyongjun3@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c

index 7e950f5d62d0fdbdafbd89b890398e87efb9f0c6..7aeb552d16ce9f1496c88e5c41af82f009937764 100644 (file)
@@ -488,14 +488,8 @@ EXPORT_SYMBOL_GPL(mtk_pinconf_bias_get);
 int mtk_pinconf_bias_disable_set_rev1(struct mtk_pinctrl *hw,
                                      const struct mtk_pin_desc *desc)
 {
-       int err;
-
-       err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN,
-                              MTK_DISABLE);
-       if (err)
-               return err;
-
-       return 0;
+       return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN,
+                               MTK_DISABLE);
 }
 EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_set_rev1);