summaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2014-05-17 01:07:14 +0200
committerMike Turquette <mturquette@linaro.org>2014-05-29 18:30:25 +0200
commit9ec2749bde1a5827beef5be64bfd5f24992f4ef3 (patch)
tree5a2fd0a8c08c4da3615fde5006a99e0279f9b55d /drivers/clk/qcom
parentclk: qcom: Support msm8974pro global clock control hardware (diff)
downloadlinux-9ec2749bde1a5827beef5be64bfd5f24992f4ef3.tar.xz
linux-9ec2749bde1a5827beef5be64bfd5f24992f4ef3.zip
clk: qcom: Return error pointers for unimplemented clocks
Not all clocks are implemented but client drivers can still request them. Currently we will return a NULL pointer to them if the clock isn't implemented in software but NULL pointers are valid clock pointers. Return an error pointer so that driver's don't proceed without a clock they may actually need. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/qcom')
-rw-r--r--drivers/clk/qcom/common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index 86b45fba5f90..9b5a1cfc6b91 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -62,8 +62,10 @@ int qcom_cc_probe(struct platform_device *pdev, const struct qcom_cc_desc *desc)
data->clk_num = num_clks;
for (i = 0; i < num_clks; i++) {
- if (!rclks[i])
+ if (!rclks[i]) {
+ clks[i] = ERR_PTR(-ENOENT);
continue;
+ }
clk = devm_clk_register_regmap(dev, rclks[i]);
if (IS_ERR(clk))
return PTR_ERR(clk);