summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorMarkus Elfring2017-06-03 19:02:24 +0200
committerTony Lindgren2017-06-08 12:02:31 +0200
commit1dfb5b59d6571104eff6629a0e73a6af347a3226 (patch)
tree364f5e079321afe6cbc3ddf9bb3eed78fb562283 /arch/arm/mach-omap2
parentARM: OMAP2+: Delete an error message for a failed memory allocation in two fu... (diff)
downloadkernel-qcow2-linux-1dfb5b59d6571104eff6629a0e73a6af347a3226.tar.gz
kernel-qcow2-linux-1dfb5b59d6571104eff6629a0e73a6af347a3226.tar.xz
kernel-qcow2-linux-1dfb5b59d6571104eff6629a0e73a6af347a3226.zip
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: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/sr_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index d7cff2632d1e..01df4907c0e3 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -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);