mailbox: qcom-ipcc: fix incorrect num_chans counting
authorJonathan Marek <jonathan@marek.ca>
Wed, 2 Aug 2023 13:52:22 +0000 (09:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:27:58 +0000 (12:27 +0200)
commit39c29d075352a642bc3ea5fe5969fbd77b1db299
tree375595bd3371d51f5f398feb1644899956113d00
parent36201d559b47ec95b6689b16d8b6b6e12fa02d9b
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>
drivers/mailbox/qcom-ipcc.c