summaryrefslogtreecommitdiffstats
path: root/drivers/hwspinlock/u8500_hsem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwspinlock/u8500_hsem.c')
-rw-r--r--drivers/hwspinlock/u8500_hsem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwspinlock/u8500_hsem.c b/drivers/hwspinlock/u8500_hsem.c
index e93eabbd660f2..0128d8fb905e4 100644
--- a/drivers/hwspinlock/u8500_hsem.c
+++ b/drivers/hwspinlock/u8500_hsem.c
@@ -119,7 +119,7 @@ static int u8500_hsem_probe(struct platform_device *pdev)
/* clear all interrupts */
writel(0xFFFF, io_base + HSEM_ICRALL);
- bank = kzalloc(sizeof(*bank) + num_locks * sizeof(*hwlock), GFP_KERNEL);
+ bank = kzalloc(struct_size(bank, lock, num_locks), GFP_KERNEL);
if (!bank) {
ret = -ENOMEM;
goto iounmap_base;