From 023cdfd9d3a8dfc3e8fe0f8fc87137b3897fc166 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 30 Aug 2026 11:07:51 -0400 Subject: Revert "mtd: maps: vmu-flash: fix fault in unaligned fixup" This reverts commit f781e80c9f1e52d92535c076573b0cdafab04864. Signed-off-by: Sasha Levin --- drivers/mtd/maps/vmu-flash.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c index ad10f7887dfa..f96a165fccc7 100644 --- a/drivers/mtd/maps/vmu-flash.c +++ b/drivers/mtd/maps/vmu-flash.c @@ -610,7 +610,7 @@ static int vmu_connect(struct maple_device *mdev) basic_flash_data = be32_to_cpu(mdev->devinfo.function_data[c - 1]); - card = kzalloc_obj(struct memcard); + card = kmalloc(sizeof(struct memcard), GFP_KERNEL); if (!card) { error = -ENOMEM; goto fail_nomem; @@ -628,13 +628,15 @@ static int vmu_connect(struct maple_device *mdev) * Not sure there are actually any multi-partition devices in the * real world, but the hardware supports them, so, so will we */ - card->parts = kzalloc_objs(struct vmupart, card->partitions); + card->parts = kmalloc_array(card->partitions, sizeof(struct vmupart), + GFP_KERNEL); if (!card->parts) { error = -ENOMEM; goto fail_partitions; } - card->mtd = kzalloc_objs(struct mtd_info, card->partitions); + card->mtd = kmalloc_array(card->partitions, sizeof(struct mtd_info), + GFP_KERNEL); if (!card->mtd) { error = -ENOMEM; goto fail_mtd_info; -- cgit v1.2.3