summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2026-08-30 11:07:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-09-02 14:26:43 +0200
commit023cdfd9d3a8dfc3e8fe0f8fc87137b3897fc166 (patch)
treec886f3830e5c2817bb9a797acf599fef83941c9e
parent774e7769ea01a2472902a3d98ed8281e029e570c (diff)
downloadlinux-stable-023cdfd9d3a8dfc3e8fe0f8fc87137b3897fc166.tar.gz
linux-stable-023cdfd9d3a8dfc3e8fe0f8fc87137b3897fc166.zip
Revert "mtd: maps: vmu-flash: fix fault in unaligned fixup"
This reverts commit f781e80c9f1e52d92535c076573b0cdafab04864. Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/mtd/maps/vmu-flash.c8
1 files 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;