Skip to content

Commit ca9ed69

Browse files
Sasha Levingregkh
authored andcommitted
Revert "mtd: maps: vmu-flash: fix fault in unaligned fixup"
This reverts commit 9049488. Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2a421e6 commit ca9ed69

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/mtd/maps/vmu-flash.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ static int vmu_connect(struct maple_device *mdev)
610610

611611
basic_flash_data = be32_to_cpu(mdev->devinfo.function_data[c - 1]);
612612

613-
card = kzalloc_obj(struct memcard);
613+
card = kmalloc(sizeof(struct memcard), GFP_KERNEL);
614614
if (!card) {
615615
error = -ENOMEM;
616616
goto fail_nomem;
@@ -628,13 +628,15 @@ static int vmu_connect(struct maple_device *mdev)
628628
* Not sure there are actually any multi-partition devices in the
629629
* real world, but the hardware supports them, so, so will we
630630
*/
631-
card->parts = kzalloc_objs(struct vmupart, card->partitions);
631+
card->parts = kmalloc_array(card->partitions, sizeof(struct vmupart),
632+
GFP_KERNEL);
632633
if (!card->parts) {
633634
error = -ENOMEM;
634635
goto fail_partitions;
635636
}
636637

637-
card->mtd = kzalloc_objs(struct mtd_info, card->partitions);
638+
card->mtd = kmalloc_array(card->partitions, sizeof(struct mtd_info),
639+
GFP_KERNEL);
638640
if (!card->mtd) {
639641
error = -ENOMEM;
640642
goto fail_mtd_info;

0 commit comments

Comments
 (0)