summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/omap-mailbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mailbox/omap-mailbox.c')
-rw-r--r--drivers/mailbox/omap-mailbox.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index 2517038a8452..e1e2c085e68e 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -729,7 +729,7 @@ static int omap_mbox_probe(struct platform_device *pdev)
return -ENODEV;
}
- finfoblk = devm_kzalloc(&pdev->dev, info_count * sizeof(*finfoblk),
+ finfoblk = devm_kcalloc(&pdev->dev, info_count, sizeof(*finfoblk),
GFP_KERNEL);
if (!finfoblk)
return -ENOMEM;
@@ -773,23 +773,23 @@ static int omap_mbox_probe(struct platform_device *pdev)
if (IS_ERR(mdev->mbox_base))
return PTR_ERR(mdev->mbox_base);
- mdev->irq_ctx = devm_kzalloc(&pdev->dev, num_users * sizeof(u32),
+ mdev->irq_ctx = devm_kcalloc(&pdev->dev, num_users, sizeof(u32),
GFP_KERNEL);
if (!mdev->irq_ctx)
return -ENOMEM;
/* allocate one extra for marking end of list */
- list = devm_kzalloc(&pdev->dev, (info_count + 1) * sizeof(*list),
+ list = devm_kcalloc(&pdev->dev, info_count + 1, sizeof(*list),
GFP_KERNEL);
if (!list)
return -ENOMEM;
- chnls = devm_kzalloc(&pdev->dev, (info_count + 1) * sizeof(*chnls),
+ chnls = devm_kcalloc(&pdev->dev, info_count + 1, sizeof(*chnls),
GFP_KERNEL);
if (!chnls)
return -ENOMEM;
- mboxblk = devm_kzalloc(&pdev->dev, info_count * sizeof(*mbox),
+ mboxblk = devm_kcalloc(&pdev->dev, info_count, sizeof(*mbox),
GFP_KERNEL);
if (!mboxblk)
return -ENOMEM;