]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Input: ims-pcu - fix calling interruptible mutex
authorDavid Lechner <dlechner@baylibre.com>
Tue, 10 Sep 2024 21:58:47 +0000 (16:58 -0500)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 10 Sep 2024 23:13:44 +0000 (16:13 -0700)
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: 703f12672e1f ("Input: ims-pcu - switch to using cleanup functions")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240910-input-misc-ims-pcu-fix-mutex-intr-v1-1-bdd983685c43@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/ims-pcu.c

index c086dadb45e3a7b150f9627868e021b8e7b9991e..058f3470b7ae2b7d6cdb71065910bd9ffad84fdc 100644 (file)
@@ -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);