Messages in this thread | | | Subject | Re: [PATCH v2] clk: ti: dra7-atl: don't allocate `parent_names' variable | From | Stephen Boyd <> | Date | Thu, 27 Oct 2022 17:27:08 -0700 |
| |
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.
| |