Skip to contentSkip to conversation

mailbox: qcom-ipcc: fix incorrect num_chans counting

PATCH New Jonathan Marek 1 participant 1 message Aug 2, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 e9d50e4b4d04 ("mailbox: qcom-ipcc: Dynamic alloc for channel arrangement")
---
 drivers/mailbox/qcom-ipcc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mailbox/qcom-ipcc.c +1 -3
index 7e27acf6c0cc..f597a1bd5684 100644
@@ -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;
-			}
 		}
 	}
 
Signature · 1 line
2.26.1