From: Nikhil Gautam <nikhilgtr@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
"Nikhil Gautam" <nikhilgtr@gmail.com>
Subject: [PATCH v2 0/3] iio: light: gp2ap002: runtime PM and error path fixes
Date: Wed, 22 Jul 2026 21:52:44 +0530 [thread overview]
Message-ID: <20260722162247.8229-1-nikhilgtr@gmail.com> (raw)
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(-)
--
2.39.5
next reply other threads:[~2026-07-22 16:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 16:22 Nikhil Gautam [this message]
2026-07-22 16:22 ` [PATCH v2 1/3] iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event writes Nikhil Gautam
2026-07-22 16:22 ` [PATCH v2 2/3] iio: light: gp2ap002: re-enable irq if runtime suspend fails Nikhil Gautam
2026-07-22 16:22 ` [PATCH v2 3/3] iio: light: gp2ap002: Fix regulator leaks in runtime resume error path Nikhil Gautam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260722162247.8229-1-nikhilgtr@gmail.com \
--to=nikhilgtr@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.