[PATCH v2 0/2] i2c: tegra: fix error handling in tegra_i2c_xfer()

From: Saurav Sachidanand

Date: Thu May 07 2026 - 18:12:22 EST


Fix two bugs in the SW mutex path introduced by commit 6077cfd716fb
("i2c: tegra: Add support for SW mutex register"):

1/2: Fix pm_runtime reference leak when tegra_i2c_mutex_lock() fails.
2/2: Make tegra_i2c_mutex_unlock() return void with WARN to avoid
silently losing transfer errors.

Changes since v1:
- Split into two patches (Jon)
- Make tegra_i2c_mutex_unlock() return void with WARN instead of
propagating the error value (Jon)

v1: https://lore.kernel.org/all/20260506195319.44810-1-sauravsc@xxxxxxxxxx/

Saurav Sachidanand (2):
i2c: tegra: fix pm_runtime leak on mutex_lock failure
i2c: tegra: make tegra_i2c_mutex_unlock() return void

drivers/i2c/busses/i2c-tegra.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)

--
2.47.3