浏览代码

Input: hp_sdc_rtc - unlock on error in hp_sdc_rtc_read_i8042timer()

The transaction task here is hp_sdc_tasklet() and it releases the lock.
The problem is if we aren't able to queue the transaction then we need
to release the lock ourselves.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dan Carpenter 11 年之前
父节点
当前提交
b64da05fb7
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      drivers/input/misc/hp_sdc_rtc.c

+ 4 - 1
drivers/input/misc/hp_sdc_rtc.c

@@ -180,7 +180,10 @@ static int64_t hp_sdc_rtc_read_i8042timer (uint8_t loadcmd, int numreg)
 	if (WARN_ON(down_interruptible(&i8042tregs)))
 		return -1;
 
-	if (hp_sdc_enqueue_transaction(&t)) return -1;
+	if (hp_sdc_enqueue_transaction(&t)) {
+		up(&i8042tregs);
+		return -1;
+	}
 	
 	/* Sleep until results come back. */
 	if (WARN_ON(down_interruptible(&i8042tregs)))