mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
drivers: qcom: rpmh-rsc: fix the loop index check in get_req_from_tcs
get_req_from_tcs introduced in patch[1] returns tcs_request from tcs_group. The size of tcs (of type - tcs_group) array in rsc_drv is TCS_TYPE_NR. So the loop index needs to be iterated up to TCS_TYPE_NR only. [1] https://patchwork.kernel.org/patch/10477547/ Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
parent
a0b1561f84
commit
efa1c257b3
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ static const struct tcs_request *get_req_from_tcs(struct rsc_drv *drv,
|
||||||
struct tcs_group *tcs;
|
struct tcs_group *tcs;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < drv->num_tcs; i++) {
|
for (i = 0; i < TCS_TYPE_NR; i++) {
|
||||||
tcs = &drv->tcs[i];
|
tcs = &drv->tcs[i];
|
||||||
if (tcs->mask & BIT(tcs_id))
|
if (tcs->mask & BIT(tcs_id))
|
||||||
return tcs->req[tcs_id - tcs->offset];
|
return tcs->req[tcs_id - tcs->offset];
|
||||||
|
|
Loading…
Reference in a new issue