summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorspjoshi@codeaurora.org <spjoshi@codeaurora.org>2016-11-15 17:19:25 -0800
committerAndy Gross <andy.gross@linaro.org>2016-11-23 11:03:00 -0600
commited19b86e817c5f30d557042f2e8ab68dc93940d4 (patch)
tree1c95a39fc5b5f2bd65a4b7bce48fc8cbdf158035 /drivers/firmware
parentab0822d57d8ccde7161aef56b97313fc24162d61 (diff)
downloadlinux-ed19b86e817c5f30d557042f2e8ab68dc93940d4.tar.bz2
firmware: qcom: scm: Return PTR_ERR when devm_clk_get fails
When devm_clk_get fails for core clock, the failure was ignored and the core_clk was explicitly set to NULL so that other remaining clocks can be queried. However, now that we have a cleaner way of expressing the clock dependency, return failure when devm_clk_get fails for core clock. Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/qcom_scm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index 7a104d31ef0f..893f953eaccf 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -338,10 +338,10 @@ static int qcom_scm_probe(struct platform_device *pdev)
if (clks & SCM_HAS_CORE_CLK) {
scm->core_clk = devm_clk_get(&pdev->dev, "core");
if (IS_ERR(scm->core_clk)) {
- if (PTR_ERR(scm->core_clk) == -EPROBE_DEFER)
- return PTR_ERR(scm->core_clk);
-
- scm->core_clk = NULL;
+ if (PTR_ERR(scm->core_clk) != -EPROBE_DEFER)
+ dev_err(&pdev->dev,
+ "failed to acquire core clk\n");
+ return PTR_ERR(scm->core_clk);
}
}