]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 12 Oct 2016 08:24:57 +0000 (05:24 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 16 Nov 2016 14:43:06 +0000 (12:43 -0200)
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 <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/davinci/vpfe_capture.c

index 22f48342584b39b06755a1dea7d465c2805a1865..9109a286a8696d79bfaf9bd02a1be70ced752a55 100644 (file)
@@ -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;