mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Acked-by: Bjorn Andersson <[email protected]> Signed-off-by: Andy Gross <[email protected]>
This commit is contained in:
parent
ab0822d57d
commit
ed19b86e81
1 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue