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

Commit a4d51f98 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qmi: dfc: fix dead loop in workqueue dfc_wq"

parents 0cbf9aff 6e5ece6e
Loading
Loading
Loading
Loading
+11 −17
Original line number Diff line number Diff line
@@ -1076,34 +1076,28 @@ static void dfc_svc_init(struct work_struct *work)
		return;

	rc = dfc_init_service(data);
	if (rc < 0) {
		pr_err("%s Failed to init service, err[%d]\n", __func__, rc);
		return;
	}

	rtnl_lock();
	qmi = (struct qmi_info *)rmnet_get_qmi_pt(data->rmnet_port);
	if (!qmi) {
		rtnl_unlock();
		goto clean_out;
		return;
	}

	qmi->dfc_pending[data->index] = NULL;
	if (rc < 0) {
		rtnl_unlock();
		goto clean_out;
	} else {
	qmi->dfc_clients[data->index] = (void *)data;
	trace_dfc_client_state_up(data->index,
				  data->svc.instance,
				  data->svc.ep_type,
				  data->svc.iface_id);
	}

	rtnl_unlock();

	pr_info("Connection established with the DFC Service\n");
	return;

clean_out:
	qmi_handle_release(&data->handle);
	destroy_workqueue(data->dfc_wq);
	kfree(data);
}

static int dfc_svc_arrive(struct qmi_handle *qmi, struct qmi_service *svc)
+9 −16
Original line number Diff line number Diff line
@@ -322,34 +322,27 @@ static void wda_svc_config(struct work_struct *work)
	int rc;

	rc = wda_set_powersave_config_req(&data->handle);
	if (rc < 0) {
		pr_err("%s Failed to init service, err[%d]\n", __func__, rc);
		return;
	}

	rtnl_lock();
	qmi = (struct qmi_info *)rmnet_get_qmi_pt(data->rmnet_port);
	if (!qmi) {
		rtnl_unlock();
		goto clean_out;
		return;
	}

	qmi->wda_pending = NULL;
	if (rc < 0) {
		rtnl_unlock();
		goto clean_out;
	} else {
	qmi->wda_client = (void *)data;
	trace_wda_client_state_up(data->svc.instance,
				  data->svc.ep_type,
				  data->svc.iface_id);

	}
	rtnl_unlock();

	pr_info("Connection established with the WDA Service\n");
	return;

clean_out:
	qmi_handle_release(&data->handle);
	destroy_workqueue(data->wda_wq);
	kfree(data);
}

static int wda_svc_arrive(struct qmi_handle *qmi, struct qmi_service *svc)