Message ID | 20170422104333.tcdpvessre3pvafk@mwanda (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Stephen Boyd |
Headers | show |
On 4/22/17 5:43 AM, Dan Carpenter wrote: > clkdev_hw_create() returns NULLs on error, it doesn't return error > pointers. Yes indeed. Thanks for the fix. FWIW Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> > > Fixes: 41ee7caf59e1 ("clk: x86: add "mclk" alias for Baytrail/Cherrytrail") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > 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; > } > > -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/22, Dan Carpenter wrote: > 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> > > 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 Applied to clk-next
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; }
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> -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html