clk: qcom: Return error pointers for unimplemented clocks
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 16 May 2014 23:07:14 +0000 (16:07 -0700)
committerMike Turquette <mturquette@linaro.org>
Thu, 29 May 2014 16:30:25 +0000 (09:30 -0700)
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>
drivers/clk/qcom/common.c

index 86b45fba5f90cb612c5151165ed4a10e07c1eb75..9b5a1cfc6b917b68c1983f8dc8a8f4916e0266d5 100644 (file)
@@ -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);
This page took 0.024752 seconds and 5 git commands to generate.