[PATCH v6 0/2] i2c: designware-platdrv: simplify reset control and fix cleanup on probe failure

Artem Shimko posted 2 patches 1 week, 1 day ago
drivers/i2c/busses/i2c-designware-platdrv.c | 41 +++++++--------------
1 file changed, 13 insertions(+), 28 deletions(-)
[PATCH v6 0/2] i2c: designware-platdrv: simplify reset control and fix cleanup on probe failure
Posted by Artem Shimko 1 week, 1 day ago
This series simplifies error handling and reset control management in
the DesignWare I2C platform driver.

Patch 1 replaces the manual reset control acquisition and deassertion
with the devm_reset_control_get_optional_exclusive_deasserted()
function. This simplifies the code by eliminating explicit deassertion
calls and associated error handling while maintaining the same
functionality through automatic resource management.

Patch 2 removes the unnecessary goto label for cleanup on probe failure.
The cleanup operations are straightforward and can be handled directly
in the error path, making the control flow more readable without
changing the error handling semantics.

Thank you!
--
Regards,
Artem

ChangeLog:
  v1:
    * https://lore.kernel.org/all/20251009074443.2010699-1-a.shimko.dev@gmail.com/
  v2:
    * https://lore.kernel.org/all/20251009083703.2038187-1-a.shimko.dev@gmail.com/
  v3:
    * https://lore.kernel.org/all/20251111140935.3220840-1-a.shimko.dev@gmail.com/T/#u
  v4:
    * https://lore.kernel.org/all/20251111145536.3232456-1-a.shimko.dev@gmail.com/
  v5:
    * 
    * [0/2] https://lore.kernel.org/all/20260123100537.1429497-1-a.shimko.dev@gmail.com/T/#u
    * [1/2] https://lore.kernel.org/all/20260123100537.1429497-2-a.shimko.dev@gmail.com/T/#u
    * [2/2] https://lore.kernel.org/all/20260123100537.1429497-3-a.shimko.dev@gmail.com/T/#u
  v6:
    * All reset related changes have been carried over to Patch 1

Artem Shimko (2):
  i2c: designware-platdrv: simplify reset control
  i2c: designware-platdrv: fix cleanup on probe failure

 drivers/i2c/busses/i2c-designware-platdrv.c | 41 +++++++--------------
 1 file changed, 13 insertions(+), 28 deletions(-)

-- 
2.43.0