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

Configure Feed

Select the types of activity you want to include in your feed.

video: omap: Improve a size determination in omapfb_do_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 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>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Markus Elfring and committed by
Bartlomiej Zolnierkiewicz
85d108de 65a4df9f

+1 -1
+1 -1
drivers/video/fbdev/omap/omapfb_main.c
··· 1645 1645 goto cleanup; 1646 1646 } 1647 1647 1648 - fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL); 1648 + fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); 1649 1649 if (fbdev == NULL) { 1650 1650 dev_err(&pdev->dev, 1651 1651 "unable to allocate memory for device info\n");