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

Commit aaad06e9 authored by Lina Iyer's avatar Lina Iyer
Browse files

drivers: mailbox: rpmh: fix validation check in probe



Fix check for TCS configuration at probe.

Change-Id: Ia695bb7598aaaabe18297eaed5d1c80be088393d
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent 3295850b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1180,7 +1180,7 @@ static int rsc_drv_probe(struct platform_device *pdev)

		if (tcs->num_tcs > MAX_TCS_PER_TYPE ||
			st + tcs->num_tcs > max_tcs ||
			st + tcs->num_tcs >= sizeof(tcs->tcs_mask))
			st + tcs->num_tcs >= 8 * sizeof(tcs->tcs_mask))
			return -EINVAL;

		tcs->tcs_mask = ((1 << tcs->num_tcs) - 1) << st;