mtd: rawnand: fsmc: Fix unchecked return value in fsmc_read_page_hwecc
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 10 Oct 2018 15:58:58 +0000 (17:58 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 5 Nov 2018 09:56:58 +0000 (10:56 +0100)
commit41d6f0d07d76257cf2d39071a439c7dd1da7271e
treeb664b97cc90375a819d6742a66df2feda8bea96c
parent9a4d83074769d6ecf1f5c3fef0f183b09abf3726
mtd: rawnand: fsmc: Fix unchecked return value in fsmc_read_page_hwecc

Check return value of nand_read_data_op.

Notice that, currently, all instances of nand_read_data_op() are
being checked, with the exception of two of them in marvell_nand
driver, in which the caller function explicitly returns 0 every
time.

Also, notice that I moved the declaration of *ret* to the top of
fsmc_read_page_hwecc().

Addresses-Coverity-ID: 1471968 ("Unchecked return value")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/fsmc_nand.c