We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0da7fac commit 1b2ed9dCopy full SHA for 1b2ed9d
drivers/clk/visconti/pll.c
@@ -262,9 +262,9 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
262
for (len = 0; rate_table[len].rate != 0; )
263
len++;
264
pll->rate_count = len;
265
- pll->rate_table = kmemdup(rate_table,
266
- pll->rate_count * sizeof(struct visconti_pll_rate_table),
267
- GFP_KERNEL);
+ pll->rate_table = kmemdup_array(rate_table,
+ pll->rate_count, sizeof(*pll->rate_table),
+ GFP_KERNEL);
268
WARN(!pll->rate_table, "%s: could not allocate rate table for %s\n", __func__, name);
269
270
init.ops = &visconti_pll_ops;
0 commit comments