Commit 82abef59 authored by David Lechner's avatar David Lechner Committed by Dmitry Torokhov

Input: ims-pcu - fix calling interruptible mutex

Fix calling scoped_cond_guard() with mutex instead of mutex_intr.

scoped_cond_guard(mutex, ...) will call mutex_lock() instead of
mutex_lock_interruptible().

Fixes: 703f1267 ("Input: ims-pcu - switch to using cleanup functions")
Signed-off-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240910-input-misc-ims-pcu-fix-mutex-intr-v1-1-bdd983685c43@baylibre.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 4172a64e
...@@ -1067,7 +1067,7 @@ static ssize_t ims_pcu_attribute_store(struct device *dev, ...@@ -1067,7 +1067,7 @@ static ssize_t ims_pcu_attribute_store(struct device *dev,
if (data_len > attr->field_length) if (data_len > attr->field_length)
return -EINVAL; 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); memset(field, 0, attr->field_length);
memcpy(field, buf, data_len); memcpy(field, buf, data_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment