From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Julia.Lawall@inria.fr, Sean Wang <sean.wang@kernel.org>,
Linus Walleij <linusw@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: cocci@inria.fr, linux-arm-kernel@lists.infradead.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH 24/36] pinctrl: mediatek: remove conditional return with no effect
Date: Fri, 24 Jul 2026 03:45:26 +0900 [thread overview]
Message-ID: <20260723184538.3888637-25-ekffu200098@gmail.com> (raw)
In-Reply-To: <20260723184538.3888637-1-ekffu200098@gmail.com>
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@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
prev parent reply other threads:[~2026-07-23 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260723184538.3888637-1-ekffu200098@gmail.com>
2026-07-23 18:45 ` [PATCH 06/36] drm: remove conditional return with no effect Sang-Heon Jeon
2026-07-23 18:45 ` [PATCH 19/36] dmaengine: qcom_hidma: " Sang-Heon Jeon
2026-07-23 18:45 ` [PATCH 20/36] stm class: " Sang-Heon Jeon
2026-07-23 18:45 ` Sang-Heon Jeon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723184538.3888637-25-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=Julia.Lawall@inria.fr \
--cc=angelogioacchino.delregno@collabora.com \
--cc=cocci@inria.fr \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=sean.wang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox