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

Commit 28c72e00 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: qcom: qmi: Fix the race condition during QMI handle release"

parents 46663084 18e4498f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -742,8 +742,6 @@ static void clean_txn_info(struct qmi_handle *handle)

int qmi_handle_destroy(struct qmi_handle *handle)
{
	int rc;

	if (!handle)
		return -EINVAL;

@@ -759,8 +757,9 @@ int qmi_handle_destroy(struct qmi_handle *handle)
	mutex_unlock(&handle->handle_lock);
	flush_workqueue(handle->handle_wq);
	destroy_workqueue(handle->handle_wq);
	rc = wait_event_interruptible(handle->reset_waitq,
				      list_empty(&handle->txn_list));
	wait_event(handle->reset_waitq,
		   (list_empty(&handle->txn_list) &&
		    list_empty(&handle->pending_txn_list)));

	kfree(handle->dest_info);
	kfree(handle);