[PATCH 0/2] media: i2c: ov7740: Fix remove() teardown and PM runtime

From: Biren Pandya

Date: Mon Jun 15 2026 - 17:04:26 EST


This series addresses two severe issues in the teardown path of the
ov7740 image sensor driver.

The first patch addresses a kernel panic caused by a use-after-destroy
on the driver's mutex, exacerbated by a double-free of both the mutex
and the V4L2 control handler.

The second patch modernizes the runtime PM sleep sequence by properly
checking the return value of PM wake operations before issuing I2C
power down sequences, preventing unbalanced PM tracking or hangs on
disconnected devices.

Biren Pandya (2):
media: i2c: ov7740: Fix use-after-destroy in remove()
media: i2c: ov7740: Fix unchecked pm_runtime_get_sync() in remove()

drivers/media/i2c/ov7740.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

--
2.50.1 (Apple Git-155)