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

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

Merge "msm: msm_bus: Do not send tcs sets when size is 0"

parents 6734be9a a9c39ddb
Loading
Loading
Loading
Loading
+24 −18
Original line number Diff line number Diff line
@@ -581,6 +581,9 @@ int msm_bus_commit_data(struct list_head *clist)
		cnt_vcd++;
	}

	if (!cnt_active)
		goto exit_msm_bus_commit_data;

	n_active = kcalloc(cnt_vcd+1, sizeof(int), GFP_KERNEL);
	if (!n_active)
		return -ENOMEM;
@@ -629,32 +632,35 @@ int msm_bus_commit_data(struct list_head *clist)
			MSM_BUS_ERR("%s: error sending active/awake sets: %d\n",
						__func__, ret);
	}

	if (cnt_wake) {
		ret = rpmh_write_batch(cur_mbox, RPMH_WAKE_ONLY_STATE,
							cmdlist_wake, n_wake);
		if (ret)
			MSM_BUS_ERR("%s: error sending wake sets: %d\n",
							__func__, ret);

	}
	if (cnt_sleep) {
		ret = rpmh_write_batch(cur_mbox, RPMH_SLEEP_STATE,
							cmdlist_sleep, n_sleep);
		if (ret)
			MSM_BUS_ERR("%s: error sending sleep sets: %d\n",
							__func__, ret);

	list_for_each_entry_safe(node, node_tmp, clist, link) {
		bcm_clist_clean(node);
		node->dirty = false;
		list_del_init(&node->link);
	}

	cur_rsc = NULL;
	kfree(cmdlist_active);
	kfree(cmdlist_wake);
	kfree(cmdlist_sleep);
	kfree(n_active);
	kfree(n_wake);
	kfree(n_sleep);

exit_msm_bus_commit_data:
	list_for_each_entry_safe(node, node_tmp, clist, link) {
		bcm_clist_clean(node);
		node->dirty = false;
		list_del_init(&node->link);
	}
	cur_rsc = NULL;
	return ret;
}