summaryrefslogtreecommitdiff
path: root/drivers/clk/clk-gemini.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk-gemini.c')
-rw-r--r--drivers/clk/clk-gemini.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/clk-gemini.c b/drivers/clk/clk-gemini.c
index 5e66e6c0205e..b51069e794ff 100644
--- a/drivers/clk/clk-gemini.c
+++ b/drivers/clk/clk-gemini.c
@@ -399,9 +399,9 @@ static void __init gemini_cc_init(struct device_node *np)
int ret;
int i;
- gemini_clk_data = kzalloc(sizeof(*gemini_clk_data) +
- sizeof(*gemini_clk_data->hws) * GEMINI_NUM_CLKS,
- GFP_KERNEL);
+ gemini_clk_data = kzalloc(struct_size(gemini_clk_data, hws,
+ GEMINI_NUM_CLKS),
+ GFP_KERNEL);
if (!gemini_clk_data)
return;