Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev-MMP: Improve a size determination in path_init()

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 according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Markus Elfring and committed by
Bartlomiej Zolnierkiewicz
965bef64 e0e894f5

+1 -1
+1 -1
drivers/video/fbdev/mmp/hw/mmp_ctrl.c
··· 406 406 dev_info(ctrl->dev, "%s: %s\n", __func__, config->name); 407 407 408 408 /* init driver data */ 409 - path_info = kzalloc(sizeof(struct mmp_path_info), GFP_KERNEL); 409 + path_info = kzalloc(sizeof(*path_info), GFP_KERNEL); 410 410 if (!path_info) 411 411 return 0; 412 412