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 /drivers/clk/x86 | |
parent | 3417f3528a2c7f8824cad7f0c35425961e98886b (diff) | |
download | talos-op-linux-0119dc6132d2110df8f3545bd0ffe29aa0752d6b.tar.gz talos-op-linux-0119dc6132d2110df8f3545bd0ffe29aa0752d6b.zip |
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>
Diffstat (limited to 'drivers/clk/x86')
-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 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; } |