summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-04-26 12:24:19 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-04-26 12:24:19 +0200
commit85d108dee574c038423f573b6ae93d43d12e971e (patch)
tree40035424a905328bd04c06a274cab57551dce715 /drivers/video
parent65a4df9f37d7282151f61c7a840ce91fdfe97420 (diff)
downloadlinux-85d108dee574c038423f573b6ae93d43d12e971e.tar.bz2
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap/omapfb_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 3479a47a3082..585f39efcff6 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1645,7 +1645,7 @@ static int omapfb_do_probe(struct platform_device *pdev,
goto cleanup;
}
- fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL);
+ fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
if (fbdev == NULL) {
dev_err(&pdev->dev,
"unable to allocate memory for device info\n");