diff options
author | Jonathan Marek | 2023-08-02 09:52:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-09-19 12:27:58 +0200 |
commit | 39c29d075352a642bc3ea5fe5969fbd77b1db299 (patch) | |
tree | 375595bd3371d51f5f398feb1644899956113d00 /drivers/mailbox/qcom-ipcc.c | |
parent | 36201d559b47ec95b6689b16d8b6b6e12fa02d9b (diff) |
mailbox: qcom-ipcc: fix incorrect num_chans counting
[ Upstream commit a493208079e299aefdc15169dc80e3da3ebb718a ]
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: e9d50e4b4d04 ("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>
Diffstat (limited to 'drivers/mailbox/qcom-ipcc.c')
-rw-r--r-- | drivers/mailbox/qcom-ipcc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c index 7e27acf6c0cc..f597a1bd5684 100644 --- a/drivers/mailbox/qcom-ipcc.c +++ b/drivers/mailbox/qcom-ipcc.c @@ -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; - } } } |