summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-stm32h7.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk-stm32h7.c')
-rw-r--r--drivers/clk/clk-stm32h7.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clk/clk-stm32h7.c b/drivers/clk/clk-stm32h7.c
index db2b162..d3271ec 100644
--- a/drivers/clk/clk-stm32h7.c
+++ b/drivers/clk/clk-stm32h7.c
@@ -1201,9 +1201,8 @@ static void __init stm32h7_rcc_init(struct device_node *np)
const char *hse_clk, *lse_clk, *i2s_clk;
struct regmap *pdrm;
- clk_data = kzalloc(sizeof(*clk_data) +
- sizeof(*clk_data->hws) * STM32H7_MAX_CLKS,
- GFP_KERNEL);
+ clk_data = kzalloc(struct_size(clk_data, hws, STM32H7_MAX_CLKS),
+ GFP_KERNEL);
if (!clk_data)
return;
OpenPOWER on IntegriCloud