9
0
Fork 0

imx-bbu-nand-fcb: Print error message when out of pebs

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2016-03-08 13:05:47 +01:00
parent b52c174b2d
commit 60f2c23684
1 changed files with 3 additions and 1 deletions

View File

@ -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);