2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00

[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 <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Markus Elfring 2016-10-12 05:24:57 -03:00 committed by Mauro Carvalho Chehab
parent 11691f0e8a
commit e4c0cd0ae3

View 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;