diff options
Diffstat (limited to 'drivers/hwspinlock')
-rw-r--r-- | drivers/hwspinlock/sprd_hwspinlock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c index d221fc9d756d..22e2ffb91743 100644 --- a/drivers/hwspinlock/sprd_hwspinlock.c +++ b/drivers/hwspinlock/sprd_hwspinlock.c @@ -93,8 +93,7 @@ static int sprd_hwspinlock_probe(struct platform_device *pdev) return -ENODEV; sprd_hwlock = devm_kzalloc(&pdev->dev, - sizeof(struct sprd_hwspinlock_dev) + - SPRD_HWLOCKS_NUM * sizeof(*lock), + struct_size(sprd_hwlock, bank.lock, SPRD_HWLOCKS_NUM), GFP_KERNEL); if (!sprd_hwlock) return -ENOMEM; |