diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2023-03-06 08:56:37 +0100 |
---|---|---|
committer | Georgi Djakov <djakov@kernel.org> | 2023-03-13 20:13:47 +0100 |
commit | 6570d1d46eeade82965ccc4a3ab7d778898ef4bf (patch) | |
tree | 98e8a80bddc82fcd56509333edbe59c7aca30b6e /drivers/interconnect | |
parent | interconnect: qcom: rpm: fix registration race (diff) | |
download | linux-6570d1d46eeade82965ccc4a3ab7d778898ef4bf.tar.xz linux-6570d1d46eeade82965ccc4a3ab7d778898ef4bf.zip |
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: 57eb14779dfd ("interconnect: qcom: icc-rpmh: Support child NoC device probe")
Cc: stable@vger.kernel.org # 6.0
Cc: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230306075651.2449-10-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Diffstat (limited to 'drivers/interconnect')
-rw-r--r-- | drivers/interconnect/qcom/icc-rpmh.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c index fd17291c61eb..5168bbf3d92f 100644 --- a/drivers/interconnect/qcom/icc-rpmh.c +++ b/drivers/interconnect/qcom/icc-rpmh.c @@ -235,8 +235,11 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev) platform_set_drvdata(pdev, qp); /* Populate child NoC devices if any */ - if (of_get_child_count(dev->of_node) > 0) - return of_platform_populate(dev->of_node, NULL, NULL, dev); + if (of_get_child_count(dev->of_node) > 0) { + ret = of_platform_populate(dev->of_node, NULL, NULL, dev); + if (ret) + goto err; + } return 0; err: |