From e4c0cd0ae34b5e8ea3e8f4eced531dccabe3124c Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Wed, 12 Oct 2016 05:24:57 -0300 Subject: [PATCH] [media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/davinci/vpfe_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 22f48342584b..9109a286a869 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -1848,7 +1848,7 @@ static int vpfe_probe(struct platform_device *pdev) } /* Allocate memory for ccdc configuration */ - ccdc_cfg = kmalloc(sizeof(struct ccdc_config), GFP_KERNEL); + ccdc_cfg = kmalloc(sizeof(*ccdc_cfg), GFP_KERNEL); if (!ccdc_cfg) goto probe_free_dev_mem; -- 2.39.5