[PATCH v6 08/10] clk: imx: Add initial support for i.MXRT1170 clock driver

Stephen Boyd sboyd at kernel.org
Mon Oct 3 12:29:07 PDT 2022


Quoting Jesse Taube (2022-10-01 09:15:38)
> On 9/30/22 16:28, Stephen Boyd wrote:
> > Quoting Jesse Taube (2022-09-01 11:33:41)
> >> +
> >> +       anp = of_find_compatible_node(NULL, NULL, "fsl,imxrt-anatop");
> >> +       pll_base = of_iomap(anp, 0);
> >> +       of_node_put(anp);
> >> +       if (WARN_ON(!pll_base))
> >> +               return -ENOMEM;
> > 
> > The kzalloc() leaked.
> LOL `grep -r of_find_compatible_node drivers/clk/imx`...
> Shall I send patches for the rest of IMX.
> 

Sure? Introducing more things to cleanup isn't useful, that's all. If
you have other things to do then don't worry about it.

> >> +
> >> +       imx_check_clk_hws(hws, IMXRT1170_CLK_END);
> >> +
> >> +       ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
> > 
> > Use devm? Or implement a driver remove function?
> Uh this is the same in the rest of imx could you explain a bit more?
> 

Use devm_of_clk_add_hw_provider() so that the provider is removed on
driver unbind.



More information about the linux-arm-kernel mailing list