On Fri, 2017-09-15 at 19:29 +0200, SF Markus Elfring wrote: > diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c [] > @@ -1372,9 +1372,8 @@ static int dcmi_formats_init(struct stm32_dcmi *dcmi) > dcmi->sd_formats = devm_kcalloc(dcmi->dev, > - num_fmts, sizeof(struct dcmi_format *), > + num_fmts, sizeof(*dcmi->sd_formats), > GFP_KERNEL); > if (!dcmi->sd_formats) > return -ENOMEM; > > - memcpy(dcmi->sd_formats, sd_fmts, > - num_fmts * sizeof(struct dcmi_format *)); > + memcpy(dcmi->sd_formats, sd_fmts, num_fmts * sizeof(*dcmi->sd_formats)); devm_kmemdup