linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: ims-pcu - fix a mutex usage error
@ 2024-09-21  7:15 Donglin Peng
  2024-09-22  7:58 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Donglin Peng @ 2024-09-21  7:15 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: javier.carrasco.cruz, kees, linux-input, linux-kernel,
	Donglin Peng

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-22  7:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-21  7:15 [PATCH] Input: ims-pcu - fix a mutex usage error Donglin Peng
2024-09-22  7:58 ` Dmitry Torokhov

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).