diff options
author | 2012-09-24 13:38:03 -0700 | |
---|---|---|
committer | 2012-10-29 11:12:33 -0700 | |
commit | 980f58a45e04b248e9dd01b0eba510a3384160db (patch) | |
tree | b71a95ea1e4cfbce6b96c11c7be993e4bc4ac4ae /drivers/clk/clk-wm831x.c | |
parent | clk: Common clocks implementation for Versatile Express (diff) | |
download | linux-980f58a45e04b248e9dd01b0eba510a3384160db.tar.gz linux-980f58a45e04b248e9dd01b0eba510a3384160db.tar.bz2 linux-980f58a45e04b248e9dd01b0eba510a3384160db.zip |
clk: wm831x: Fix clk_register() error code checking
clk_register() returns an ERR_PTR upon failure, not NULL. Fix
these error paths.
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/clk-wm831x.c')
-rw-r--r-- | drivers/clk/clk-wm831x.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c index e7b7765e85f3..eb1afafca037 100644 --- a/drivers/clk/clk-wm831x.c +++ b/drivers/clk/clk-wm831x.c @@ -371,20 +371,20 @@ static __devinit int wm831x_clk_probe(struct platform_device *pdev) clkdata->xtal_hw.init = &wm831x_xtal_init; clkdata->xtal = clk_register(&pdev->dev, &clkdata->xtal_hw); - if (!clkdata->xtal) - return -EINVAL; + if (IS_ERR(clkdata->xtal)) + return PTR_ERR(clkdata->xtal); clkdata->fll_hw.init = &wm831x_fll_init; clkdata->fll = clk_register(&pdev->dev, &clkdata->fll_hw); - if (!clkdata->fll) { - ret = -EINVAL; + if (IS_ERR(clkdata->fll)) { + ret = PTR_ERR(clkdata->fll); goto err_xtal; } clkdata->clkout_hw.init = &wm831x_clkout_init; clkdata->clkout = clk_register(&pdev->dev, &clkdata->clkout_hw); - if (!clkdata->clkout) { - ret = -EINVAL; + if (IS_ERR(clkdata->clkout)) { + ret = PTR_ERR(clkdata->clkout); goto err_fll; } |