summaryrefslogtreecommitdiffstats
path: root/common/imx-bbu-nand-fcb.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-03-08 13:05:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-08 13:35:32 +0200
commit60f2c23684797173169a940abf9f1985537c156e (patch)
tree4c3390659be0030b362b3057168c3133516ff4cb /common/imx-bbu-nand-fcb.c
parentb52c174b2d850992482b26977e4a67d4a63f3e97 (diff)
downloadbarebox-60f2c23684797173169a940abf9f1985537c156e.tar.gz
imx-bbu-nand-fcb: Print error message when out of pebs
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 b3dea37..04c6e60 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -420,8 +420,10 @@ static int imx_bbu_write_firmware(struct mtd_info *mtd, unsigned num, void *buf,
while (len > 0) {
int now = min(len, mtd->erasesize);
- if (!num_blocks)
+ if (!num_blocks) {
+ pr_err("Out of good eraseblocks, cannot write firmware\n");
return -ENOSPC;
+ }
pr_debug("writing %p peb %d, left 0x%08x\n",
buf, block, len);