diff options
| author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-12-31 10:21:22 -0500 |
|---|---|---|
| committer | Brian Norris <computersforpeace@gmail.com> | 2016-01-06 18:17:42 -0500 |
| commit | 6e75632ac34d2f63ab586880f7e9747bd9b708a6 (patch) | |
| tree | 2626c5c0eee71cb63dc52f58ddbc28b5dacb543f /drivers/mtd/tests | |
| parent | 43584c1d42acf54464907773b0b8b7596d7b0a29 (diff) | |
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: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/tests')
| -rw-r--r-- | drivers/mtd/tests/pagetest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/tests/pagetest.c b/drivers/mtd/tests/pagetest.c index ba1890d5632c..ff1e0565b020 100644 --- a/drivers/mtd/tests/pagetest.c +++ b/drivers/mtd/tests/pagetest.c | |||
| @@ -127,13 +127,12 @@ static int crosstest(void) | |||
| 127 | unsigned char *pp1, *pp2, *pp3, *pp4; | 127 | unsigned char *pp1, *pp2, *pp3, *pp4; |
| 128 | 128 | ||
| 129 | pr_info("crosstest\n"); | 129 | pr_info("crosstest\n"); |
| 130 | pp1 = kmalloc(pgsize * 4, GFP_KERNEL); | 130 | pp1 = kzalloc(pgsize * 4, GFP_KERNEL); |
| 131 | if (!pp1) | 131 | if (!pp1) |
| 132 | return -ENOMEM; | 132 | return -ENOMEM; |
| 133 | pp2 = pp1 + pgsize; | 133 | pp2 = pp1 + pgsize; |
| 134 | pp3 = pp2 + pgsize; | 134 | pp3 = pp2 + pgsize; |
| 135 | pp4 = pp3 + pgsize; | 135 | pp4 = pp3 + pgsize; |
| 136 | memset(pp1, 0, pgsize * 4); | ||
| 137 | 136 | ||
| 138 | addr0 = 0; | 137 | addr0 = 0; |
| 139 | for (i = 0; i < ebcnt && bbt[i]; ++i) | 138 | for (i = 0; i < ebcnt && bbt[i]; ++i) |
