Skip to content

Commit

Permalink
clk: qcom: common: Return NULL from clk_hw OF provider
Browse files Browse the repository at this point in the history
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>
Link: https://lkml.kernel.org/r/20191014102308.27441-3-tdas@codeaurora.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Taniya Das authored and Stephen Boyd committed Nov 7, 2019
1 parent 1a1c782 commit ffe37ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/qcom/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ffe37ed

Please sign in to comment.