summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/intel/avs/path.c')
-rw-r--r--sound/soc/intel/avs/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/avs/path.c b/sound/soc/intel/avs/path.c
index 05302ab705ae..adbe23a47847 100644
--- a/sound/soc/intel/avs/path.c
+++ b/sound/soc/intel/avs/path.c
@@ -478,7 +478,7 @@ static int avs_modext_create(struct avs_dev *adev, struct avs_path_module *mod)
int ret, i;
num_pins = tcfg->generic.num_input_pins + tcfg->generic.num_output_pins;
- cfg_size = sizeof(*cfg) + sizeof(*cfg->pin_fmts) * num_pins;
+ cfg_size = struct_size(cfg, pin_fmts, num_pins);
cfg = kzalloc(cfg_size, GFP_KERNEL);
if (!cfg)