Skip to contentSkip to conversation

mtd: return -1 if verify failed

PATCH In review Roel Kluin 2 participants 2 messages Jul 1, 2010 – Jul 13, 2010 Memory technology devices (MTD)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 mtd: return -1 if verify failed

It should return -1 if the verify failed.

---
I think this needed, correct?

drivers/mtd/tests/mtd_pagetest.c +1 -1
index 6bc1b82..7414888 100644
@@ -358,7 +358,7 @@ static int erasecrosstest(void)
 		printk(PRINT_PREF "verify failed!\n");
 		errcnt += 1;
 		ok = 0;
-		return err;
+		return -1;
 	}
 
 	printk(PRINT_PREF "erasing block %d\n", ebnum);
#1 lore raw
Quoted 11 lines · Roel Kluin

It should return -1 if the verify failed.

---
I think this needed, correct?

drivers/mtd/tests/mtd_pagetest.c +0 -0
index 6bc1b82..7414888 100644

drivers/mtd/tests/mtd_pagetest.c static int erasecrosstest(void) · line 362

Quoted 6 lines
drivers/mtd/tests/mtd_pagetest.c +1 -1
@@ -358,7 +358,7 @@ static int erasecrosstest(void)
 		printk(PRINT_PREF "verify failed!\n");
 		errcnt += 1;
 		ok = 0;
-		return err;
+		return -1;
 	}

Yeah, I changed your patch a bit and removed the 'ok' variable altogether. Pushed to l2-mtd-2.6.git, please, check:

http://git.infradead.org/users/dedekind/l2-mtd-2.6.git/commit/4e2ef8529d9bc2e2b96f18a1a2917bda5475f0e4

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)