interconnect: qcom: icc-rpmh: Don't return error for NULL voter

Some providers have sparsely-populated voter arrays. In case one of the
indices is NULL, then don't return an error and just skip it instead.

Change-Id: I09d892a2abb9c1219ddea32bdbf6be41eaaed2de
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
This commit is contained in:
Mike Tipton 2023-04-26 13:38:56 -07:00
parent c54a729dd7
commit 6cb62df279

View File

@ -422,9 +422,11 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
return -ENOMEM;
for (i = 0; i < qp->num_voters; i++) {
qp->voters[i] = of_bcm_voter_get(qp->dev, desc->voters[i]);
if (IS_ERR(qp->voters[i]))
return PTR_ERR(qp->voters[i]);
if (desc->voters[i]) {
qp->voters[i] = of_bcm_voter_get(qp->dev, desc->voters[i]);
if (IS_ERR(qp->voters[i]))
return PTR_ERR(qp->voters[i]);
}
}
}