]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: OMAP2+: Improve a size determination in sr_dev_init()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 3 Jun 2017 17:02:24 +0000 (19:02 +0200)
committerTony Lindgren <tony@atomide.com>
Thu, 8 Jun 2017 10:02:31 +0000 (03:02 -0700)
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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/sr_device.c

index d7cff2632d1e4150923c2756eb8f5d08faeb3a64..01df4907c0e305a9ba0fecebba1af5c3607d15d9 100644 (file)
@@ -102,7 +102,7 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
        char *name = "smartreflex";
        static int i;
 
-       sr_data = kzalloc(sizeof(struct omap_sr_data), GFP_KERNEL);
+       sr_data = kzalloc(sizeof(*sr_data), GFP_KERNEL);
        if (!sr_data) {
                pr_err("%s: Unable to allocate memory for %s sr_data\n",
                       __func__, oh->name);