Skip to content

iio: light: gp2ap002: runtime PM and error path fixes

Nikhil Gautam linux-iio lkml 2 versions – Applied

Status from this message: Applied to the fixes-togreg branch of iio.git

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesApplied
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Removed new lines between Tags as per Andy's comment
- Removed dup call pm_runtime_mark_last_busy() in gp2ap002_write_event_config() as already handled in pm_runtime_put_autosuspend() as per Andy's comment

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event writesdrivers/iio/light/gp2ap002.c+9 -42 replies
2/3iio: light: gp2ap002: re-enable irq if runtime suspend failsdrivers/iio/light/gp2ap002.c+1 -00 replies
3/3iio: light: gp2ap002: Fix regulator leaks in runtime resume error pathdrivers/iio/light/gp2ap002.c+8 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] iio: light: gp2ap002: runtime PM and error path fixes

Hi,

This series fixes three issues in the gp2ap002 driver, all present since the driver was introduced.

Patch 1 fixes an unbalanced runtime PM reference count reachable from userspace by writing the event enable attribute twice with the same value, as the IIO core does not deduplicate such writes.

Patch 2 fixes the runtime suspend error path leaving the IRQ disable depth unbalanced, permanently disabling proximity events after a failed suspend.

Patch 3 fixes regulator enable leaks in the runtime resume error paths, which matters as the supplies may be shared with other devices.

Regards,
Nikhil Gautam

Changes in v2:
- Removed new lines between Tags as per Andy's comment
- Removed dup call pm_runtime_mark_last_busy() in gp2ap002_write_event_config() as already handled in pm_runtime_put_autosuspend() as per Andy's comment

Nikhil Gautam (3):
iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event
writes
iio: light: gp2ap002: re-enable irq if runtime suspend fails
iio: light: gp2ap002: Fix regulator leaks in runtime resume error path

 drivers/iio/light/gp2ap002.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)
Signature · 1 line
2.39.5