aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/rockchip/clk-cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/rockchip/clk-cpu.c')
-rw-r--r--drivers/clk/rockchip/clk-cpu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clk/rockchip/clk-cpu.c b/drivers/clk/rockchip/clk-cpu.c
index 6ea7fba9f9e5..398a226ad34e 100644
--- a/drivers/clk/rockchip/clk-cpu.c
+++ b/drivers/clk/rockchip/clk-cpu.c
@@ -369,9 +369,8 @@ struct clk *rockchip_clk_register_cpuclk(const char *name,
if (nrates > 0) {
cpuclk->rate_count = nrates;
- cpuclk->rate_table = kmemdup(rates,
- sizeof(*rates) * nrates,
- GFP_KERNEL);
+ cpuclk->rate_table = kmemdup_array(rates, nrates, sizeof(*rates),
+ GFP_KERNEL);
if (!cpuclk->rate_table) {
ret = -ENOMEM;
goto unregister_notifier;