diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-19 13:28:06 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-11-20 21:15:31 -0800 |
commit | b64da05fb746c6ff5bcb9abeaa52684d1b08a2b9 (patch) | |
tree | 033d51b5ae9914a0b1bb25596fb71bc7e56547f6 /drivers/input/misc | |
parent | 0221e670cd25bb41062031eaa653f6447707abc6 (diff) | |
download | linux-stable-b64da05fb746c6ff5bcb9abeaa52684d1b08a2b9.tar.gz linux-stable-b64da05fb746c6ff5bcb9abeaa52684d1b08a2b9.tar.bz2 linux-stable-b64da05fb746c6ff5bcb9abeaa52684d1b08a2b9.zip |
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>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/hp_sdc_rtc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 86b822806e95..45e0e3e55de2 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/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))) |