summaryrefslogtreecommitdiff
path: root/drivers/mailbox/riscv-sbi-mpxy-mbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mailbox/riscv-sbi-mpxy-mbox.c')
-rw-r--r--drivers/mailbox/riscv-sbi-mpxy-mbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/riscv-sbi-mpxy-mbox.c b/drivers/mailbox/riscv-sbi-mpxy-mbox.c
index 714f7fb97a2f..ea69c6b6b4f9 100644
--- a/drivers/mailbox/riscv-sbi-mpxy-mbox.c
+++ b/drivers/mailbox/riscv-sbi-mpxy-mbox.c
@@ -783,7 +783,7 @@ static int mpxy_mbox_populate_channels(struct mpxy_mbox *mbox)
return dev_err_probe(mbox->dev, -ENODEV, "no MPXY channels available\n");
/* Allocate and fetch all channel IDs */
- channel_ids = kcalloc(mbox->channel_count, sizeof(*channel_ids), GFP_KERNEL);
+ channel_ids = kzalloc_objs(*channel_ids, mbox->channel_count);
if (!channel_ids)
return -ENOMEM;
rc = mpxy_get_channel_ids(mbox->channel_count, channel_ids);