From: Donglin Peng <dolinux.peng@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: javier.carrasco.cruz@gmail.com, kees@kernel.org,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Donglin Peng <dolinux.peng@gmail.com>
Subject: [PATCH] Input: ims-pcu - fix a mutex usage error
Date: Sat, 21 Sep 2024 15:15:01 +0800 [thread overview]
Message-ID: <20240921071501.263450-1-dolinux.peng@gmail.com> (raw)
The mutex_lock_interruptible should be switched to scoped_cond_guard(mutex_intr, ...)
instead of scoped_cond_guard(mutex, ..).
Fixes: 703f12672e1f ("Input: ims-pcu - switch to using cleanup functions")
Signed-off-by: Donglin Peng <dolinux.peng@gmail.com>
---
drivers/input/misc/ims-pcu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c
index c086dadb45e3..058f3470b7ae 100644
--- a/drivers/input/misc/ims-pcu.c
+++ b/drivers/input/misc/ims-pcu.c
@@ -1067,7 +1067,7 @@ static ssize_t ims_pcu_attribute_store(struct device *dev,
if (data_len > attr->field_length)
return -EINVAL;
- scoped_cond_guard(mutex, return -EINTR, &pcu->cmd_mutex) {
+ scoped_cond_guard(mutex_intr, return -EINTR, &pcu->cmd_mutex) {
memset(field, 0, attr->field_length);
memcpy(field, buf, data_len);
--
2.25.1
next reply other threads:[~2024-09-21 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-21 7:15 Donglin Peng [this message]
2024-09-22 7:58 ` [PATCH] Input: ims-pcu - fix a mutex usage error Dmitry Torokhov
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=20240921071501.263450-1-dolinux.peng@gmail.com \
--to=dolinux.peng@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=kees@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).