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:
parent
b52c174b2d
commit
60f2c23684
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue