]> git.ipfire.org Git - thirdparty/linux.git/commit
i2c: designware-platdrv: fix cleanup on probe failure
authorArtem Shimko <a.shimko.dev@gmail.com>
Fri, 30 Jan 2026 11:10:37 +0000 (14:10 +0300)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 5 Feb 2026 10:28:22 +0000 (11:28 +0100)
commit9eb9f7c304f7a17fd5e3bfa462a36e77dbf2a3e4
treef48bac67a43310096d7eb03953e38359e1d42900
parent78821a753fc911a64b5bccc44cb13fd7203aea13
i2c: designware-platdrv: fix cleanup on probe failure

Simplify the error handling in dw_i2c_plat_probe() by consolidating
cleanup operations directly in the error path instead of using a
goto label.

This eliminates the goto statement, makes the error handling more
transparent, and reduces code indirection while maintaining identical
cleanup behavior on probe failure.

Signed-off-by: Artem Shimko <a.shimko.dev@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260130111039.874548-3-a.shimko.dev@gmail.com
drivers/i2c/busses/i2c-designware-platdrv.c