From 0119dc6132d2110df8f3545bd0ffe29aa0752d6b Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 22 Apr 2017 13:43:33 +0300 Subject: [PATCH] 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: 41ee7caf59e1 ("clk: x86: add "mclk" alias for Baytrail/Cherrytrail") Signed-off-by: Dan Carpenter Acked-by: Pierre-Louis Bossart Signed-off-by: Stephen Boyd --- drivers/clk/x86/clk-pmc-atom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c index fafc99120dc2..f99abc1106f0 100644 --- a/drivers/clk/x86/clk-pmc-atom.c +++ b/drivers/clk/x86/clk-pmc-atom.c @@ -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; } -- 2.20.1