Commit 1dfb5b59 authored by Markus Elfring's avatar Markus Elfring Committed by Tony Lindgren

ARM: OMAP2+: Improve a size determination in sr_dev_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.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 1a61a2a5
...@@ -102,7 +102,7 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) ...@@ -102,7 +102,7 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
char *name = "smartreflex"; char *name = "smartreflex";
static int i; static int i;
sr_data = kzalloc(sizeof(struct omap_sr_data), GFP_KERNEL); sr_data = kzalloc(sizeof(*sr_data), GFP_KERNEL);
if (!sr_data) { if (!sr_data) {
pr_err("%s: Unable to allocate memory for %s sr_data\n", pr_err("%s: Unable to allocate memory for %s sr_data\n",
__func__, oh->name); __func__, oh->name);
......
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