Re: [linux-yocto] clk: imx: imx8mq: Use devm_kzalloc() to allocate the memory for clk_hw_data

2023-12-04 Thread Bruce Ashfield
In message: [linux-yocto] clk: imx: imx8mq: Use devm_kzalloc() to allocate the 
memory for clk_hw_data
on 04/12/2023 Kevin Hao wrote:

> From: Kevin Hao 
> 
> This is a change introduced by stable commit 7d416973cd12 ("clk: imx:
> imx8mq: correct error handling path"), but it was overrode by merge
> commit 0be36f447e39 ("Merge branch 'v5.15/standard/base'
> into v5.15/standard/nxp-sdk-5.15/nxp-soc"). Restore it back.
> 
> Signed-off-by: Kevin Hao 
> ---
> Hi Bruce,
> 
> Could you help me merge this into the following two branches?
>   v5.15/standard/nxp-sdk-5.15/nxp-soc
>   v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc

merged.

Bruce

> 
>  drivers/clk/imx/clk-imx8mq.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c
> index 83acb6e268de..8944fff971eb 100644
> --- a/drivers/clk/imx/clk-imx8mq.c
> +++ b/drivers/clk/imx/clk-imx8mq.c
> @@ -321,8 +321,7 @@ static int imx8mq_clocks_probe(struct platform_device 
> *pdev)
>  
>   check_m4_enabled();
>  
> - clk_hw_data = kzalloc(struct_size(clk_hw_data, hws,
> -   IMX8MQ_CLK_END), GFP_KERNEL);
> + clk_hw_data = devm_kzalloc(dev, struct_size(clk_hw_data, hws, 
> IMX8MQ_CLK_END), GFP_KERNEL);
>   if (WARN_ON(!clk_hw_data))
>   return -ENOMEM;
>  
> -- 
> 2.39.2
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13364): 
https://lists.yoctoproject.org/g/linux-yocto/message/13364
Mute This Topic: https://lists.yoctoproject.org/mt/102967041/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] clk: imx: imx8mq: Use devm_kzalloc() to allocate the memory for clk_hw_data

2023-12-04 Thread Kevin Hao
From: Kevin Hao 

This is a change introduced by stable commit 7d416973cd12 ("clk: imx:
imx8mq: correct error handling path"), but it was overrode by merge
commit 0be36f447e39 ("Merge branch 'v5.15/standard/base'
into v5.15/standard/nxp-sdk-5.15/nxp-soc"). Restore it back.

Signed-off-by: Kevin Hao 
---
Hi Bruce,

Could you help me merge this into the following two branches?
  v5.15/standard/nxp-sdk-5.15/nxp-soc
  v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc

 drivers/clk/imx/clk-imx8mq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c
index 83acb6e268de..8944fff971eb 100644
--- a/drivers/clk/imx/clk-imx8mq.c
+++ b/drivers/clk/imx/clk-imx8mq.c
@@ -321,8 +321,7 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)
 
check_m4_enabled();
 
-   clk_hw_data = kzalloc(struct_size(clk_hw_data, hws,
- IMX8MQ_CLK_END), GFP_KERNEL);
+   clk_hw_data = devm_kzalloc(dev, struct_size(clk_hw_data, hws, 
IMX8MQ_CLK_END), GFP_KERNEL);
if (WARN_ON(!clk_hw_data))
return -ENOMEM;
 
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13355): 
https://lists.yoctoproject.org/g/linux-yocto/message/13355
Mute This Topic: https://lists.yoctoproject.org/mt/102967041/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-