Commit 0119dc61 authored by Dan Carpenter's avatar Dan Carpenter Committed by Stephen Boyd

clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL

clkdev_hw_create() returns NULLs on error, it doesn't return error
pointers.

Fixes: 41ee7caf ("clk: x86: add "mclk" alias for Baytrail/Cherrytrail")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 3417f352
...@@ -339,8 +339,8 @@ static int plt_clk_probe(struct platform_device *pdev) ...@@ -339,8 +339,8 @@ static int plt_clk_probe(struct platform_device *pdev)
} }
} }
data->mclk_lookup = clkdev_hw_create(&data->clks[3]->hw, "mclk", NULL); data->mclk_lookup = clkdev_hw_create(&data->clks[3]->hw, "mclk", NULL);
if (IS_ERR(data->mclk_lookup)) { if (!data->mclk_lookup) {
err = PTR_ERR(data->mclk_lookup); err = -ENOMEM;
goto err_unreg_clk_plt; goto err_unreg_clk_plt;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment