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:
parent
3417f3528a
commit
0119dc6132
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue