mtd: nand: check the return code of 'read_oob/read_oob_raw'
authorShmulik Ladkani <shmulik.ladkani@gmail.com>
Wed, 9 May 2012 10:13:34 +0000 (13:13 +0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 14 May 2012 04:25:00 +0000 (23:25 -0500)
commit1951f2f710a621ae0bc4268617046a6c02c634d0
treee39850855d7a3062666592736c4e19c1bd4104f5
parent5c2ffb11d40dd967eecb45b8570a871746ba124b
mtd: nand: check the return code of 'read_oob/read_oob_raw'

Apparently, there is an implementor of 'read_oob' which may return an
error inidication (e.g. docg4_read_oob may return -EIO).

Test the return value of 'read_oob/read_oob_raw', and if negative,
propagate the error, so it's returned by the '_read_oob' interface.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_base.c