Skip to content

Commit

Permalink
mailbox: qcom-ipcc: fix incorrect num_chans counting
Browse files Browse the repository at this point in the history
[ Upstream commit a493208 ]

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: e9d50e4 ("mailbox: qcom-ipcc: Dynamic alloc for channel arrangement")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
flto authored and gregkh committed Sep 19, 2023
1 parent 36201d5 commit 39c29d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mailbox/qcom-ipcc.c
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 39c29d0

Please sign in to comment.