aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/ingenic/tcu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/ingenic/tcu.c')
-rw-r--r--drivers/clk/ingenic/tcu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c
index a1a5f9cb439e..ad7daa494fd4 100644
--- a/drivers/clk/ingenic/tcu.c
+++ b/drivers/clk/ingenic/tcu.c
@@ -358,8 +358,7 @@ static int __init ingenic_tcu_probe(struct device_node *np)
}
}
- tcu->clocks = kzalloc(sizeof(*tcu->clocks) +
- sizeof(*tcu->clocks->hws) * TCU_CLK_COUNT,
+ tcu->clocks = kzalloc(struct_size(tcu->clocks, hws, TCU_CLK_COUNT),
GFP_KERNEL);
if (!tcu->clocks) {
ret = -ENOMEM;