aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/mmp
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-04-26 12:24:18 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-04-26 12:24:18 +0200
commit965bef6483e2bab20cd959d014f83b48da70e71c (patch)
tree493a72607af98a1931e3cf9b4a8afde0c8a4c239 /drivers/video/fbdev/mmp
parentvideo: fbdev-MMP: Delete an error message for a failed memory allocation in two functions (diff)
downloadlinux-dev-965bef6483e2bab20cd959d014f83b48da70e71c.tar.xz
linux-dev-965bef6483e2bab20cd959d014f83b48da70e71c.zip
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>
Diffstat (limited to 'drivers/video/fbdev/mmp')
-rw-r--r--drivers/video/fbdev/mmp/hw/mmp_ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
index 9f912ea0bfce..fcdbb2df137f 100644
--- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
+++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
@@ -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;