]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: i2c: imx214: Rectify probe error handling related to runtime PM
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 10 Jan 2025 12:36:01 +0000 (14:36 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Sat, 15 Feb 2025 14:22:41 +0000 (15:22 +0100)
commitccc888d1698b6f42d52ddf5cecfe50fe925c95e5
treeca822712967af497bac0cc5a89216729d6390a67
parentabd88757252c2a2cea7909f3922de1f0e9e04002
media: i2c: imx214: Rectify probe error handling related to runtime PM

There were multiple issues in the driver's probe function related to
error handling:

- Device's PM runtime status wasn't reverted to suspended on some errors
  in probe.

- Runtime PM was left enabled for the device on some probe errors.

- Device was left powered on if a probe failure happened or when it
  was removed when it was powered on.

- An extra pm_runtime_set_suspended() was issued in driver's remove
  function when the device was suspended.

Fix these bugs.

Fixes: 436190596241 ("media: imx214: Add imx214 camera sensor driver")
Cc: stable@vger.kernel.org # for >= v6.12
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/imx214.c