summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-04-26 17:41:26 +0200
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-04-29 08:56:48 +0200
commite637f5fe8e0cbee455b75afbc0cf2a0cc76997f4 (patch)
treec9dad64b05b6a68228061ea1bc722a54107a506e /drivers/mtd
parent111bfed4f30ff16e1d47e4ce3a1f427882f365d3 (diff)
downloadtalos-op-linux-e637f5fe8e0cbee455b75afbc0cf2a0cc76997f4.tar.gz
talos-op-linux-e637f5fe8e0cbee455b75afbc0cf2a0cc76997f4.zip
mtd: rawnand: gpmi: return valid value from bch_set_geometry()
The caller of bch_set_geometry() expects the return value to be an error code, so !0 is not valid. return the error from the just called function instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c
index 39834bedf460..83697b8df871 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c
@@ -258,8 +258,9 @@ int bch_set_geometry(struct gpmi_nand_data *this)
unsigned int gf_len;
int ret;
- if (common_nfc_set_geometry(this))
- return !0;
+ ret = common_nfc_set_geometry(this);
+ if (ret)
+ return ret;
block_count = bch_geo->ecc_chunk_count - 1;
block_size = bch_geo->ecc_chunk_size;
OpenPOWER on IntegriCloud