Skip to content

Input: clean up conditional returns with no effect

Sang-Heon Jeon linux-input lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 1 replyIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Input: pmic8xxx-keypad - remove conditional return with no effectdrivers/input/keyboard/pmic8xxx-keypad.c+1 -70 replies
2/3Input: rmi_smbus - remove conditional return with no effectdrivers/input/rmi4/rmi_smbus.c+1 -60 replies
3/3Input: synaptics_i2c - return 0 explicitly on successdrivers/input/mouse/synaptics_i2c.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] Input: clean up conditional returns with no effect

Hello,

This series cleans up conditional returns where both branches return the same value, so the check has no effect. The Input patch of the treewide v1 series [1] is split per driver and posted separately.

Patches 1-2 are generated by the Coccinelle script, which you can find in v1.

Patch 3 keeps the check in synaptics_i2c_reg_set() and returns 0 explicitly instead, which is the preferred way when there are multiple failure points.

---
Changes from v1 [1]
- Split patches per driver
- Change base to input/next
- Filter only Input patch
- Return 0 instead of removing the check, as suggested by Dmitry

[1] https://lore.kernel.org/all/[email protected]/
---

Sang-Heon Jeon (3):
Input: pmic8xxx-keypad - remove conditional return with no effect
Input: rmi_smbus - remove conditional return with no effect
Input: synaptics_i2c - return 0 explicitly on success

 drivers/input/keyboard/pmic8xxx-keypad.c | 8 +-------
 drivers/input/mouse/synaptics_i2c.c      | 2 +-
 drivers/input/rmi4/rmi_smbus.c           | 7 +------
 3 files changed, 3 insertions(+), 14 deletions(-)
Signature · 1 line
2.43.0