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

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

Merge "drivers: qcom: rpmh-rsc: check for control TCS availablilty"

parents 0cbcc5e1 603c54fd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -642,9 +642,11 @@ int rpmh_rsc_write_pdc_data(struct rsc_drv *drv, const struct tcs_request *msg)
{
	int i;
	void __iomem *addr = drv->base + RSC_PDC_DRV_DATA;
	struct tcs_group *tcs = get_tcs_of_type(drv, CONTROL_TCS);
	struct tcs_cmd *cmd;

	if (!msg || !msg->cmds || msg->num_cmds != RSC_PDC_DATA_SIZE)
	if (!msg || !msg->cmds || msg->num_cmds != RSC_PDC_DATA_SIZE ||
	    !tcs->num_tcs)
		return -EINVAL;

	for (i = 0; i < msg->num_cmds; i++) {