Skip to content

Commit 6570d1d

Browse files
jhovoldGeorgi Djakov
authored andcommitted
interconnect: qcom: rpmh: fix probe child-node error handling
Make sure to clean up and release resources properly also in case probe fails when populating child devices. Fixes: 57eb147 ("interconnect: qcom: icc-rpmh: Support child NoC device probe") Cc: [email protected] # 6.0 Cc: Luca Weiss <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 90ae93d commit 6570d1d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/interconnect/qcom/icc-rpmh.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,11 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
235235
platform_set_drvdata(pdev, qp);
236236

237237
/* Populate child NoC devices if any */
238-
if (of_get_child_count(dev->of_node) > 0)
239-
return of_platform_populate(dev->of_node, NULL, NULL, dev);
238+
if (of_get_child_count(dev->of_node) > 0) {
239+
ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
240+
if (ret)
241+
goto err;
242+
}
240243

241244
return 0;
242245
err:

0 commit comments

Comments
 (0)