]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
video: fbdev-MMP: Improve a size determination in path_init()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 26 Apr 2018 10:24:18 +0000 (12:24 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 26 Apr 2018 10:24:18 +0000 (12:24 +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 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>
drivers/video/fbdev/mmp/hw/mmp_ctrl.c

index 9f912ea0bfce8ea31102bb23e8335f40577b6ce1..fcdbb2df137f891e58bcdce792a3a3101daa73d1 100644 (file)
@@ -406,7 +406,7 @@ static int path_init(struct mmphw_path_plat *path_plat,
        dev_info(ctrl->dev, "%s: %s\n", __func__, config->name);
 
        /* init driver data */
-       path_info = kzalloc(sizeof(struct mmp_path_info), GFP_KERNEL);
+       path_info = kzalloc(sizeof(*path_info), GFP_KERNEL);
        if (!path_info)
                return 0;