* [PATCH] clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL
@ 2017-04-22 10:43 Dan Carpenter
2017-04-24 13:45 ` Pierre-Louis Bossart
2017-04-28 18:38 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-04-22 10:43 UTC (permalink / raw)
To: Michael Turquette, Pierre-Louis Bossart
Cc: Stephen Boyd, Irina Tirdea, Andy Shevchenko, linux-clk,
kernel-janitors
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
+++ 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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL
2017-04-22 10:43 [PATCH] clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL Dan Carpenter
@ 2017-04-24 13:45 ` Pierre-Louis Bossart
2017-04-28 18:38 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2017-04-24 13:45 UTC (permalink / raw)
To: Dan Carpenter, Michael Turquette
Cc: Stephen Boyd, Irina Tirdea, Andy Shevchenko, linux-clk,
kernel-janitors
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;
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL
2017-04-22 10:43 [PATCH] clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL Dan Carpenter
2017-04-24 13:45 ` Pierre-Louis Bossart
@ 2017-04-28 18:38 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2017-04-28 18:38 UTC (permalink / raw)
To: Dan Carpenter
Cc: Michael Turquette, Pierre-Louis Bossart, Irina Tirdea,
Andy Shevchenko, linux-clk, kernel-janitors
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
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-28 18:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-22 10:43 [PATCH] clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL Dan Carpenter
2017-04-24 13:45 ` Pierre-Louis Bossart
2017-04-28 18:38 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).