aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/mtd_subpagetest.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2013-05-02 17:18:51 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-05 15:49:22 -0400
commit33777e6676ca60652bd48c7867641fb779106909 (patch)
tree71cb59715664940f1f7ba53f4cc7463680efe405 /drivers/mtd/tests/mtd_subpagetest.c
parent59bff7fb7a0b461320744a9a9b7bf75b8eeddea8 (diff)
mtd: tests: don't print error messages when out-of-memory
These strings are now unnecessary and discouraged in the kernel. The kernel will have plenty of big scary messages if kmalloc fails. These now only serve to bloat the module. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/tests/mtd_subpagetest.c')
-rw-r--r--drivers/mtd/tests/mtd_subpagetest.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/mtd/tests/mtd_subpagetest.c b/drivers/mtd/tests/mtd_subpagetest.c
index aade56f27945..e41a04f5caab 100644
--- a/drivers/mtd/tests/mtd_subpagetest.c
+++ b/drivers/mtd/tests/mtd_subpagetest.c
@@ -333,10 +333,8 @@ static int scan_for_bad_eraseblocks(void)
333 int i, bad = 0; 333 int i, bad = 0;
334 334
335 bbt = kzalloc(ebcnt, GFP_KERNEL); 335 bbt = kzalloc(ebcnt, GFP_KERNEL);
336 if (!bbt) { 336 if (!bbt)
337 pr_err("error: cannot allocate memory\n");
338 return -ENOMEM; 337 return -ENOMEM;
339 }
340 338
341 pr_info("scanning for bad eraseblocks\n"); 339 pr_info("scanning for bad eraseblocks\n");
342 for (i = 0; i < ebcnt; ++i) { 340 for (i = 0; i < ebcnt; ++i) {
@@ -393,15 +391,11 @@ static int __init mtd_subpagetest_init(void)
393 err = -ENOMEM; 391 err = -ENOMEM;
394 bufsize = subpgsize * 32; 392 bufsize = subpgsize * 32;
395 writebuf = kmalloc(bufsize, GFP_KERNEL); 393 writebuf = kmalloc(bufsize, GFP_KERNEL);
396 if (!writebuf) { 394 if (!writebuf)
397 pr_info("error: cannot allocate memory\n");
398 goto out; 395 goto out;
399 }
400 readbuf = kmalloc(bufsize, GFP_KERNEL); 396 readbuf = kmalloc(bufsize, GFP_KERNEL);
401 if (!readbuf) { 397 if (!readbuf)
402 pr_info("error: cannot allocate memory\n");
403 goto out; 398 goto out;
404 }
405 399
406 err = scan_for_bad_eraseblocks(); 400 err = scan_for_bad_eraseblocks();
407 if (err) 401 if (err)