Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4281687 authored by Se Wang (Patrick) Oh's avatar Se Wang (Patrick) Oh Committed by Sarangdhar Joshi
Browse files

soc: qcom: sysmon: fix mutex error in in sysmon driver



When PIL probing is deferred, data->instance_id is 0.
Hence sysmon_notifier_register exits and it unlocks the mutex
which is not locked. So lock the mutext before the first
error condition check.

Change-Id: I99b5db71de8703c95ca70141529c42fb330436e6
Signed-off-by: default avatarSe Wang (Patrick) Oh <sewango@codeaurora.org>
parent da830b29
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -659,12 +659,12 @@ int sysmon_notifier_register(struct subsys_desc *desc)
	data->clnt_handle = NULL;
	data->legacy_version = false;

	mutex_lock(&sysmon_list_lock);
	if (data->instance_id <= 0) {
		pr_debug("SSCTL instance id not defined\n");
		goto add_list;
	}

	mutex_lock(&sysmon_list_lock);
	if (sysmon_wq)
		goto notif_register;