OSDN Git Service

mtd: docg4: ecc.read_page() returns 0 on uncorrectable errors
authorMike Dunn <mikedunn@newsguy.com>
Tue, 11 Sep 2012 15:50:50 +0000 (08:50 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 29 Sep 2012 14:54:11 +0000 (15:54 +0100)
commit5bf3d66a933efb71fa6db08a5043a617b6eadb4a
tree3aa65355aedf87e6e3ef71926351adaaf7d500c5
parent61de9da657e8c52606d45ae67dfa187111bf9b55
mtd: docg4: ecc.read_page() returns 0 on uncorrectable errors

Currently the docg4's ecc.read_page() method returns -EBADMSG when
uncorrectable bitflips occur.  This is wrong; 0 should be returned in
this case.  An error code should only be returned by this method in the
case of a hardware error (probably -EIO).

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Acked-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>
drivers/mtd/nand/docg4.c