diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-04-22 13:43:33 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-05-01 11:13:25 -0700 |
commit | 0119dc6132d2110df8f3545bd0ffe29aa0752d6b (patch) | |
tree | a8c311ff819392ff7281a3a7385d92b9cf7212c7 | |
parent | 3417f3528a2c7f8824cad7f0c35425961e98886b (diff) | |
download | op-kernel-dev-0119dc6132d2110df8f3545bd0ffe29aa0752d6b.zip op-kernel-dev-0119dc6132d2110df8f3545bd0ffe29aa0752d6b.tar.gz |
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 <dan.carpenter@oracle.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r-- | drivers/clk/x86/clk-pmc-atom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c index fafc991..f99abc1 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; } |