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: 41ee7caf59 ("clk: x86: add "mclk" alias for Baytrail/Cherrytrail")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
Dan Carpenter 2017-04-22 13:43:33 +03:00 committed by Stephen Boyd
parent 3417f3528a
commit 0119dc6132
1 changed files with 2 additions and 2 deletions

View File

@ -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);
if (IS_ERR(data->mclk_lookup)) {
err = PTR_ERR(data->mclk_lookup);
if (!data->mclk_lookup) {
err = -ENOMEM;
goto err_unreg_clk_plt;
}