Commit a4932080 authored by Jonathan Marek's avatar Jonathan Marek Committed by Jassi Brar

mailbox: qcom-ipcc: fix incorrect num_chans counting

Breaking out early when a match is found leads to an incorrect num_chans
value when more than one ipcc mailbox channel is used by the same device.

Fixes: e9d50e4b ("mailbox: qcom-ipcc: Dynamic alloc for channel arrangement")
Signed-off-by: default avatarJonathan Marek <jonathan@marek.ca>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent e9803aac
......@@ -227,10 +227,8 @@ static int qcom_ipcc_setup_mbox(struct qcom_ipcc *ipcc,
ret = of_parse_phandle_with_args(client_dn, "mboxes",
"#mbox-cells", j, &curr_ph);
of_node_put(curr_ph.np);
if (!ret && curr_ph.np == controller_dn) {
if (!ret && curr_ph.np == controller_dn)
ipcc->num_chans++;
break;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment