Commit 965bef64 authored by Markus Elfring's avatar Markus Elfring Committed by Bartlomiej Zolnierkiewicz

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent e0e894f5
...@@ -406,7 +406,7 @@ static int path_init(struct mmphw_path_plat *path_plat, ...@@ -406,7 +406,7 @@ static int path_init(struct mmphw_path_plat *path_plat,
dev_info(ctrl->dev, "%s: %s\n", __func__, config->name); dev_info(ctrl->dev, "%s: %s\n", __func__, config->name);
/* init driver data */ /* init driver data */
path_info = kzalloc(sizeof(struct mmp_path_info), GFP_KERNEL); path_info = kzalloc(sizeof(*path_info), GFP_KERNEL);
if (!path_info) if (!path_info)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment