From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: arina.kharlamova@mbzuai.ac.ae
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH v2] Input: bma150 - Fix runtime PM usage count leak in open
Date: Mon, 30 Nov 2026 22:11:40 -0800 [thread overview]
Message-ID: <aw5lFJQWxOEiuQyp@google.com> (raw)
In-Reply-To: <20261201-s2p-c10-v2-1-7345a0bb3aff@mbzuai.ac.ae>
On Tue, Dec 01, 2026 at 02:29:00AM +0400, Arina Kharlamova via B4 Relay wrote:
> From: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
>
> pm_runtime_get_sync() keeps the usage count raised even when it fails,
> and bma150_open() returns on that error without dropping it. The same
> happens when bma150_set_mode() fails. The input core does not call
> close() after a failed open(), so every failed open leaks one count.
>
> Use pm_runtime_resume_and_get(), which drops the count when it fails,
> and put the reference when setting the mode fails.
>
> Fixes: c17ca3f5a2c9 ("Input: add driver for Bosch Sensortec's BMA150 accelerometer")
> Signed-off-by: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2026-12-01 6:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 22:29 [PATCH v2] Input: bma150 - Fix runtime PM usage count leak in open Arina Kharlamova via B4 Relay
2026-12-01 6:11 ` Dmitry Torokhov [this message]
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=aw5lFJQWxOEiuQyp@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=arina.kharlamova@mbzuai.ac.ae \
--cc=linux-input@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox