summaryrefslogtreecommitdiffstats
path: root/common/imx-bbu-nand-fcb.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-03-11 11:11:02 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-08 13:35:32 +0200
commitab603a5e30142a13a9fd85abcccae3bedf6ba079 (patch)
treec9657cc30bc60cb1ab6815e12fe7a7778d21c581 /common/imx-bbu-nand-fcb.c
parent5c9b26378e5b80cc876ec2515047d8b2759ff47c (diff)
downloadbarebox-ab603a5e30142a13a9fd85abcccae3bedf6ba079.tar.gz
barebox-ab603a5e30142a13a9fd85abcccae3bedf6ba079.tar.xz
imx-bbu-nand-fcb: Print error when writing blocks fails
When writing to a block fails the update handler fails relatively silent. Print an error message in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/imx-bbu-nand-fcb.c')
-rw-r--r--common/imx-bbu-nand-fcb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 3e1f35fbea..5ded45ae59 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -441,8 +441,10 @@ static int imx_bbu_write_firmware(struct mtd_info *mtd, unsigned num, void *buf,
continue;
}
- if (ret)
+ if (ret) {
+ pr_err("Writing block %d failed with: %s\n", block, strerror(-ret));
return ret;
+ }
len -= now;
buf += now;