projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
899611e
)
mtd: fix callback return value check
author
Baruch Siach
<baruch@tkos.co.il>
Mon, 9 Aug 2010 04:20:23 +0000
(07:20 +0300)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Sun, 24 Oct 2010 22:26:13 +0000
(23:26 +0100)
Drivers may (and do) return negative errno values other than -1 from the
ecc.correct callback.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_base.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/nand_base.c
b/drivers/mtd/nand/nand_base.c
index
d551ddd
..
0fd22cc
100644
(file)
--- a/
drivers/mtd/nand/nand_base.c
+++ b/
drivers/mtd/nand/nand_base.c
@@
-1223,7
+1223,7
@@
static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, uint3
int stat;
stat = chip->ecc.correct(mtd, p, &chip->buffers->ecccode[i], &chip->buffers->ecccalc[i]);
- if (stat
== -1
)
+ if (stat
< 0
)
mtd->ecc_stats.failed++;
else
mtd->ecc_stats.corrected += stat;