Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd30d2af authored by Veera Vegivada's avatar Veera Vegivada
Browse files

interconnect: qcom: Fix re-initializing the bcm



Currently, qcom_icc_bcm_init always assumes the bcm is not initialized.
There is a possibility that same bcm can belong to multiple providers
and re-initing the bcm adds the same bcm multiple times to the nodes
which are under the control of the bcm.
Hence add condition to check for bcm inited.

Change-Id: I3961963a6ef1a7b76d7ab708f648146fe1a30c99
Signed-off-by: default avatarVeera Vegivada <vvegivad@codeaurora.org>
parent 9ddceddf
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
 *
 */

@@ -131,6 +131,10 @@ int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev)
	size_t data_count;
	int i;

	/* BCM is already initialised*/
	if (bcm->addr)
		return 0;

	bcm->addr = cmd_db_read_addr(bcm->name);
	if (!bcm->addr) {
		dev_err(dev, "%s could not find RPMh address\n",