From ed5b57826dc972956ef1d071310f0cc0a73cc4c3 Mon Sep 17 00:00:00 2001 From: kurasawa Date: Mon, 9 Dec 2024 15:25:24 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=83=8F=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=83=AA=E3=83=B3=E3=82=B0"mutex=5Funlock"=E3=81=AE?= =?UTF-8?q?=E5=91=BC=E3=81=B3=E5=87=BA=E3=81=97=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drivers/rtmouse_dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/rtmouse_dev.c b/src/drivers/rtmouse_dev.c index e9c6f1c..1146b14 100644 --- a/src/drivers/rtmouse_dev.c +++ b/src/drivers/rtmouse_dev.c @@ -59,6 +59,7 @@ static int i2c_counter_set(struct rtcnt_device_info *dev_info, int setval) printk(KERN_ERR "%s: Failed writing to i2c counter device, addr=0x%x\n", __func__, client->addr); + mutex_unlock(&dev_info->lock); return -ENODEV; } // printk(KERN_INFO "set 0x%x lsb = 0x%x\n", client->addr, lsb); @@ -67,6 +68,7 @@ static int i2c_counter_set(struct rtcnt_device_info *dev_info, int setval) printk(KERN_ERR "%s: Failed writing to i2c counter device, addr=0x%x\n", __func__, client->addr); + mutex_unlock(&dev_info->lock); return -ENODEV; } mutex_unlock(&dev_info->lock); @@ -90,6 +92,7 @@ static int i2c_counter_read(struct rtcnt_device_info *dev_info, int *ret) KERN_ERR "%s: Failed reading from i2c counter device, addr=0x%x\n", __func__, client->addr); + mutex_unlock(&dev_info->lock); return -ENODEV; } msb = i2c_smbus_read_byte_data(client, CNT_ADDR_MSB); @@ -98,6 +101,7 @@ static int i2c_counter_read(struct rtcnt_device_info *dev_info, int *ret) KERN_ERR "%s: Failed reading from i2c counter device, addr=0x%x\n", __func__, client->addr); + mutex_unlock(&dev_info->lock); return -ENODEV; } mutex_unlock(&dev_info->lock);