lkml.org 
[lkml]   [2022]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] clk: ti: dra7-atl: don't allocate `parent_names' variable
From
Date
Quoting Dario Binacchi (2022-10-18 09:03:52)
> diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> index ff4d6a951681..78482d1a4a33 100644
> --- a/drivers/clk/ti/clk-dra7-atl.c
> +++ b/drivers/clk/ti/clk-dra7-atl.c
> @@ -188,24 +188,17 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
> goto cleanup;
> }
>
> - parent_names = kzalloc(sizeof(char *), GFP_KERNEL);
> -
> - if (!parent_names)
> - goto cleanup;
> -
> parent_names[0] = of_clk_get_parent_name(node, 0);

Can you use struct clk_parent_data instead and assign index to 0? Then
we don't even need to use of_clk_get_parent_name() here.

\
 
 \ /
  Last update: 2022-10-28 02:28    [W:0.066 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site