aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwspinlock/omap_hwspinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwspinlock/omap_hwspinlock.c')
-rw-r--r--drivers/hwspinlock/omap_hwspinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c
index ad2f8cac8487..d897e5251c36 100644
--- a/drivers/hwspinlock/omap_hwspinlock.c
+++ b/drivers/hwspinlock/omap_hwspinlock.c
@@ -132,7 +132,7 @@ static int omap_hwspinlock_probe(struct platform_device *pdev)
132 132
133 num_locks = i * 32; /* actual number of locks in this device */ 133 num_locks = i * 32; /* actual number of locks in this device */
134 134
135 bank = kzalloc(sizeof(*bank) + num_locks * sizeof(*hwlock), GFP_KERNEL); 135 bank = kzalloc(struct_size(bank, lock, num_locks), GFP_KERNEL);
136 if (!bank) { 136 if (!bank) {
137 ret = -ENOMEM; 137 ret = -ENOMEM;
138 goto iounmap_base; 138 goto iounmap_base;