summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSang-Heon Jeon <ekffu200098@gmail.com>2026-07-30 02:09:33 +0900
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-08-04 21:27:53 -0700
commitf6efbdcecdeeba4bf81fcebb3397a817f5e3ae7b (patch)
tree780f0c58bce49ba66d3e50d4828412df06fc64ef
parent7f9c8c6716a97e55ab52426df98a3b4007174757 (diff)
Input: pmic8xxx-keypad - remove conditional return with no effect
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> Link: https://patch.msgid.link/20260729171001.260698-2-ekffu200098@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/keyboard/pmic8xxx-keypad.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c b/drivers/input/keyboard/pmic8xxx-keypad.c
index 35d1aa2a22a5..c916e80e2f58 100644
--- a/drivers/input/keyboard/pmic8xxx-keypad.c
+++ b/drivers/input/keyboard/pmic8xxx-keypad.c
@@ -462,15 +462,9 @@ static int pmic8xxx_kp_enable(struct pmic8xxx_kp *kp)
static int pmic8xxx_kp_disable(struct pmic8xxx_kp *kp)
{
- int rc;
-
kp->ctrl_reg &= ~KEYP_CTRL_KEYP_EN;
- rc = regmap_write(kp->regmap, KEYP_CTRL, kp->ctrl_reg);
- if (rc < 0)
- return rc;
-
- return rc;
+ return regmap_write(kp->regmap, KEYP_CTRL, kp->ctrl_reg);
}
static int pmic8xxx_kp_open(struct input_dev *dev)