From 484796ea3441b17fc403ec332819c79fda2d7764 Mon Sep 17 00:00:00 2001 From: Kazushi Kurasawa Date: Thu, 12 Dec 2024 14:35:33 +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=E6=99=82=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=82=BD=E3=83=BC=E3=82=B9=E3=83=AA=E3=83=BC=E3=82=AF=E3=81=8C?= =?UTF-8?q?=E8=B5=B7=E3=81=93=E3=82=8A=E5=BE=97=E3=82=8B=E7=AE=87=E6=89=80?= =?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3=20(#96)?= 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);