Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e75632a authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Brian Norris
Browse files

mtd: tests: consolidate kmalloc/memset 0 call to kzalloc



This is an API consolidation only. The use of kmalloc + memset to 0
is equivalent to kzalloc.

Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 43584c1d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -127,13 +127,12 @@ static int crosstest(void)
	unsigned char *pp1, *pp2, *pp3, *pp4;

	pr_info("crosstest\n");
	pp1 = kmalloc(pgsize * 4, GFP_KERNEL);
	pp1 = kzalloc(pgsize * 4, GFP_KERNEL);
	if (!pp1)
		return -ENOMEM;
	pp2 = pp1 + pgsize;
	pp3 = pp2 + pgsize;
	pp4 = pp3 + pgsize;
	memset(pp1, 0, pgsize * 4);

	addr0 = 0;
	for (i = 0; i < ebcnt && bbt[i]; ++i)