> -----Original Message----- > From: Stephen Boyd [mailto:sboyd@xxxxxxxxxxxxxx] > Sent: 15 September, 2016 0:33 > To: Tirdea, Irina > Cc: linux-clk@xxxxxxxxxxxxxxx; Michael Turquette; alsa-devel@xxxxxxxxxxxxxxxx; Mark Brown; Takashi Iwai; Bossart, Pierre-louis; Pierre- > Louis Bossart > Subject: Re: [PATCH v3] clk: x86: Add Atom PMC platform clocks > > On 09/09, Irina Tirdea wrote: > > + > > +static const char **plt_clk_register_parents(struct platform_device *pdev, > > + struct clk_plt_data *data, > > + const struct pmc_clk *clks) > > +{ > > + const char **parent_names; > > + int i, err; > > + > > + data->nparents = 0; > > + while (clks[data->nparents].name) > > + data->nparents++; > > + > > + data->parents = devm_kzalloc(&pdev->dev, > > + sizeof(*data->parents) * data->nparents, > > + GFP_KERNEL); > > This could be devm_kcalloc() > OK, will send v4 with this change. > ---8<---- > diff --git a/drivers/clk/x86/clk-byt-plt.c b/drivers/clk/x86/clk-byt-plt.c > index 9dbf4b04ae47..7bd6c0dded00 100644 > --- a/drivers/clk/x86/clk-byt-plt.c > +++ b/drivers/clk/x86/clk-byt-plt.c > @@ -259,9 +259,8 @@ static const char **plt_clk_register_parents(struct platform_device *pdev, > while (clks[data->nparents].name) > data->nparents++; > > - data->parents = devm_kzalloc(&pdev->dev, > - sizeof(*data->parents) * data->nparents, > - GFP_KERNEL); > + data->parents = devm_kcalloc(&pdev->dev, data->nparents, > + sizeof(*data->parents), GFP_KERNEL); > if (!data->parents) { > err = -ENOMEM; > goto err_out; > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > a Linux Foundation Collaborative Project _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel