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

Commit 210b807d authored by Shrey Vijay's avatar Shrey Vijay
Browse files

slimbus-msm: Destroy stale QMI handles



In case of a SSR/PDR down notification miss, QMI handles
wouldn't get destroyed which in turn would result in
stale notifications and memory leak.

Hence destroy stale QMI handles if any, as part of
PDR/SSR up sequence to avoid above mentioned situation.

Change-Id: Ie5621f86664b344c5891671229aed20cf1cd8852
Signed-off-by: default avatarShrey Vijay <shreyv@codeaurora.org>
parent 63098a4e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1706,6 +1706,11 @@ int msm_slim_qmi_init(struct msm_slim_ctrl *dev, bool apps_is_master)
	struct qmi_handle *handle;
	struct slimbus_select_inst_req_msg_v01 req;

	if (dev->qmi.handle || dev->qmi.task) {
		pr_err("%s: Destroying stale QMI client handle\n", __func__);
		msm_slim_qmi_exit(dev);
	}

	kthread_init_worker(&dev->qmi.kworker);
	init_completion(&dev->qmi.defer_comp);