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

Commit 839d05d1 authored by raghavendar rao l's avatar raghavendar rao l
Browse files

msm:qmi: Fix race condition



Add changes to fix race condition while sending
modem init QMI sync message.

Change-Id: I2183dd2da40b589ccd628469273b33edc2ea399d
Signed-off-by: default avatarRaghavendar rao l <rlomte@codequrora.org>
parent 17192351
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -1515,13 +1515,13 @@ static void ipa3_q6_clnt_svc_arrive(struct work_struct *work)
		IPAWANERR(
		"ipa3_qmi_init_modem_send_sync_msg failed due to SSR!\n");
		/* Cleanup when ipa3_wwan_remove is called */
		if (ipa_q6_clnt != NULL) {
		mutex_lock(&ipa3_qmi_lock);
		if (ipa_q6_clnt != NULL) {
			qmi_handle_release(ipa_q6_clnt);
			vfree(ipa_q6_clnt);
			ipa_q6_clnt = NULL;
			mutex_unlock(&ipa3_qmi_lock);
		}
		mutex_unlock(&ipa3_qmi_lock);
		IPAWANERR("Exit from service arrive fun\n");
		return;
	}