File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments