[PATCH 10/10] mtd: nand: gpmi: return error code from gpmi_ecc_write_page
Sascha Hauer
s.hauer at pengutronix.de
Wed Dec 6 01:19:25 PST 2017
When something goes wrong in gpmi_ecc_write_page() return an
error rather than howling in the logs.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index d8038b62246c..d1f1bd69f496 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -1132,8 +1132,6 @@ static int gpmi_ecc_write_page(struct mtd_info *mtd, struct nand_chip *chip,
/* Ask the NFC. */
ret = gpmi_send_page(this, payload_phys, auxiliary_phys);
- if (ret)
- dev_err(this->dev, "Error in ECC-based write: %d\n", ret);
if (oob_mapped)
dma_unmap_single(this->dev, auxiliary_phys, mtd->oobsize,
@@ -1143,7 +1141,7 @@ static int gpmi_ecc_write_page(struct mtd_info *mtd, struct nand_chip *chip,
dma_unmap_single(this->dev, payload_phys, mtd->writesize,
DMA_TO_DEVICE);
- return 0;
+ return ret;
}
/*
--
2.11.0
More information about the linux-mtd
mailing list