summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohui Tao <xtao@nvidia.com>2013-10-08 14:43:52 -0700
committerHarshada Kale <hkale@nvidia.com>2013-10-10 04:28:45 -0700
commit5d0f7164f4b3e7690cc174fdeb4873453d3e99f0 (patch)
tree85301c3c60dca537e9d1a15f7102bb2cbd6ce378
parentfb4a444dc777c9c8ca9e7d6d50ccc1ec93841751 (diff)
input: touch: raydium: release mutex in error
The mutex needs to be released when there is an error inside the rm_tch_ts_send_signal. Bug 1384590 Change-Id: I269f1087724726c00eb31c8481dee3af577a2985 Signed-off-by: Xiaohui Tao <xtao@nvidia.com> Reviewed-on: http://git-master/r/282913 Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-by: Robert Collins <rcollins@nvidia.com> Reviewed-by: Ankit Pashiney <apashiney@nvidia.com> GVS: Gerrit_Virtual_Submit
-rw-r--r--drivers/input/touchscreen/rm31080a_ts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/rm31080a_ts.c b/drivers/input/touchscreen/rm31080a_ts.c
index 5887942545dc..ce9889633ef6 100644
--- a/drivers/input/touchscreen/rm31080a_ts.c
+++ b/drivers/input/touchscreen/rm31080a_ts.c
@@ -949,12 +949,14 @@ static int rm_tch_ts_send_signal(int pid, int iInfo)
t = find_task_by_vpid(pid);
rcu_read_unlock();
if (t == NULL) {
+ mutex_unlock(&lock);
dev_err(&g_spi->dev, "%s: no such pid\n", __func__);
return FAIL;
} else
ret = send_sig_info(RM_TS_SIGNAL, &info, t); /*send the signal*/
if (ret < 0) {
+ mutex_unlock(&lock);
dev_err(&g_spi->dev, "%s: send sig failed err:%d \n", __func__, ret);
return FAIL;
}