lkml.org 
[lkml]   [2017]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] [media] stm32-dcmi: Improve four size determinations
From
Date
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

\
 
 \ /
  Last update: 2017-09-15 20:16    [W:0.039 / U:0.616 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site