summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-01-16 23:06:09 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-16 23:06:09 -0800
commit91c4cf4d3c30eb61cd608cb164255d77019ab80f (patch)
tree05c790b9849470aaba9e80140b12bfb3f32f5c1c /drivers
parentb3a739e9c7815a310b0ec96f3a21ba75551665e3 (diff)
parent06a774048fd602e73279af771040608f32e0bdab (diff)
Merge "soc: qcom: service-notifier: fix object corruption"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/soc/qcom/service-notifier.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/soc/qcom/service-notifier.c b/drivers/soc/qcom/service-notifier.c
index 84a2aeee8cf7..e7307c46a895 100644
--- a/drivers/soc/qcom/service-notifier.c
+++ b/drivers/soc/qcom/service-notifier.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -336,11 +336,13 @@ static void root_service_service_arrive(struct work_struct *work)
int rc;
int curr_state;
+ mutex_lock(&qmi_client_release_lock);
/* Create a Local client port for QMI communication */
data->clnt_handle = qmi_handle_create(root_service_clnt_notify, work);
if (!data->clnt_handle) {
pr_err("QMI client handle alloc failed (instance-id: %d)\n",
data->instance_id);
+ mutex_unlock(&qmi_client_release_lock);
return;
}
@@ -353,9 +355,11 @@ static void root_service_service_arrive(struct work_struct *work)
data->instance_id, rc);
qmi_handle_destroy(data->clnt_handle);
data->clnt_handle = NULL;
+ mutex_unlock(&qmi_client_release_lock);
return;
}
data->service_connected = true;
+ mutex_unlock(&qmi_client_release_lock);
pr_info("Connection established between QMI handle and %d service\n",
data->instance_id);
/* Register for indication messages about service */