mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clk/axs10x: Clear init field in driver probe
@ 2016-12-12 11:08 Jose Abreu
  2016-12-12 19:03 ` Michael Turquette
  0 siblings, 1 reply; 2+ messages in thread
From: Jose Abreu @ 2016-12-12 11:08 UTC (permalink / raw)
  To: linux-clk
  Cc: Jose Abreu, Carlos Palminha, Stephen Boyd, Michael Turquette,
	linux-kernel

Init field must be cleared in driver probe as this structure is not dinamically allocated. If not, wrong flags can be passed to core.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/clk/axs10x/i2s_pll_clock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/axs10x/i2s_pll_clock.c b/drivers/clk/axs10x/i2s_pll_clock.c
index 411310d..02d3bcd 100644
--- a/drivers/clk/axs10x/i2s_pll_clock.c
+++ b/drivers/clk/axs10x/i2s_pll_clock.c
@@ -182,6 +182,7 @@ static int i2s_pll_clk_probe(struct platform_device *pdev)
 	if (IS_ERR(pll_clk->base))
 		return PTR_ERR(pll_clk->base);
 
+	memset(&init, 0, sizeof(init));
 	clk_name = node->name;
 	init.name = clk_name;
 	init.ops = &i2s_pll_ops;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk/axs10x: Clear init field in driver probe
  2016-12-12 11:08 [PATCH] clk/axs10x: Clear init field in driver probe Jose Abreu
@ 2016-12-12 19:03 ` Michael Turquette
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Turquette @ 2016-12-12 19:03 UTC (permalink / raw)
  To: Jose Abreu, linux-clk
  Cc: Jose Abreu, Carlos Palminha, Stephen Boyd, linux-kernel

Quoting Jose Abreu (2016-12-12 03:08:55)
> Init field must be cleared in driver probe as this structure is not dinamically allocated. If not, wrong flags can be passed to core.
> 
> Signed-off-by: Jose Abreu <joabreu@synopsys.com>

Applied to clk-next. You can find this patch merged after v4.10-rc1 is
released in a couple of weeks.

Regards,
Mike

> Cc: Carlos Palminha <palminha@synopsys.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: linux-clk@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  drivers/clk/axs10x/i2s_pll_clock.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/axs10x/i2s_pll_clock.c b/drivers/clk/axs10x/i2s_pll_clock.c
> index 411310d..02d3bcd 100644
> --- a/drivers/clk/axs10x/i2s_pll_clock.c
> +++ b/drivers/clk/axs10x/i2s_pll_clock.c
> @@ -182,6 +182,7 @@ static int i2s_pll_clk_probe(struct platform_device *pdev)
>         if (IS_ERR(pll_clk->base))
>                 return PTR_ERR(pll_clk->base);
>  
> +       memset(&init, 0, sizeof(init));
>         clk_name = node->name;
>         init.name = clk_name;
>         init.ops = &i2s_pll_ops;
> -- 
> 1.9.1
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-12 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-12 11:08 [PATCH] clk/axs10x: Clear init field in driver probe Jose Abreu
2016-12-12 19:03 ` Michael Turquette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®