Re: [PATCH v2] clk: ti: dra7-atl: don't allocate `parent_names' variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux