summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorSang-Heon Jeon <ekffu200098@gmail.com>2026-07-30 02:09:34 +0900
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-08-04 21:27:53 -0700
commit5005fa144501d866c392f7fc3d84ba7c2939ee20 (patch)
tree5d4167c160f4e11cad8cd0e207926e67b66cf042 /drivers/input
parentf6efbdcecdeeba4bf81fcebb3397a817f5e3ae7b (diff)
downloadlwn-5005fa144501d866c392f7fc3d84ba7c2939ee20.tar.gz
lwn-5005fa144501d866c392f7fc3d84ba7c2939ee20.zip
Input: rmi_smbus - 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-3-ekffu200098@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/rmi4/rmi_smbus.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/input/rmi4/rmi_smbus.c b/drivers/input/rmi4/rmi_smbus.c
index 6de68c602558..3160714a514a 100644
--- a/drivers/input/rmi4/rmi_smbus.c
+++ b/drivers/input/rmi4/rmi_smbus.c
@@ -177,13 +177,8 @@ static int smb_block_read(struct rmi_transport_dev *xport,
struct rmi_smb_xport *rmi_smb =
container_of(xport, struct rmi_smb_xport, xport);
struct i2c_client *client = rmi_smb->client;
- int retval;
- retval = i2c_smbus_read_block_data(client, commandcode, buf);
- if (retval < 0)
- return retval;
-
- return retval;
+ return i2c_smbus_read_block_data(client, commandcode, buf);
}
static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,