summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/mtd_speedtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/tests/mtd_speedtest.c')
-rw-r--r--drivers/mtd/tests/mtd_speedtest.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mtd/tests/mtd_speedtest.c b/drivers/mtd/tests/mtd_speedtest.c
index a6ce9c1fa6c5..20b63d1ad494 100644
--- a/drivers/mtd/tests/mtd_speedtest.c
+++ b/drivers/mtd/tests/mtd_speedtest.c
@@ -313,10 +313,8 @@ static int scan_for_bad_eraseblocks(void)
int i, bad = 0;
bbt = kzalloc(ebcnt, GFP_KERNEL);
- if (!bbt) {
- pr_err("error: cannot allocate memory\n");
+ if (!bbt)
return -ENOMEM;
- }
if (!mtd_can_have_bb(mtd))
goto out;
@@ -384,10 +382,8 @@ static int __init mtd_speedtest_init(void)
err = -ENOMEM;
iobuf = kmalloc(mtd->erasesize, GFP_KERNEL);
- if (!iobuf) {
- pr_err("error: cannot allocate memory\n");
+ if (!iobuf)
goto out;
- }
prandom_bytes(iobuf, mtd->erasesize);
OpenPOWER on IntegriCloud