diff mbox series

[v4,2/5] clk: qcom: common: Return NULL from clk_hw OF provider

Message ID 20191014102308.27441-3-tdas@codeaurora.org (mailing list archive)
State Accepted, archived
Headers show
Series Add Global Clock controller (GCC) driver for SC7180 | expand

Commit Message

Taniya Das Oct. 14, 2019, 10:23 a.m. UTC
Return NULL in the cases where the clk_hw is not registered with the
clock provider, but the clock consumer still requests for a clock id.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
 drivers/clk/qcom/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
of the Code Aurora Forum, hosted by the  Linux Foundation.

Comments

Stephen Boyd Nov. 7, 2019, 9:11 p.m. UTC | #1
Quoting Taniya Das (2019-10-14 03:23:05)
> Return NULL in the cases where the clk_hw is not registered with the
> clock provider, but the clock consumer still requests for a clock id.
> 
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index 28ddc747d703..caba81d18c70 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -218,7 +218,7 @@  static struct clk_hw *qcom_cc_clk_hw_get(struct of_phandle_args *clkspec,
 		return ERR_PTR(-EINVAL);
 	}

-	return cc->rclks[idx] ? &cc->rclks[idx]->hw : ERR_PTR(-ENOENT);
+	return cc->rclks[idx] ? &cc->rclks[idx]->hw : NULL;
 }

 int qcom_cc_really_probe(struct platform_device *pdev,