From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.85 #2 (Red Hat Linux)) id 1afn0o-0005Tz-Ag for barebox@lists.infradead.org; Tue, 15 Mar 2016 11:19:43 +0000 From: Sascha Hauer Date: Tue, 15 Mar 2016 12:19:14 +0100 Message-Id: <1458040754-32240-12-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1458040754-32240-1-git-send-email-s.hauer@pengutronix.de> References: <1458040754-32240-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 11/11] imx-bbu-nand-fcb: Print error message when out of pebs To: Barebox List Signed-off-by: Sascha Hauer --- common/imx-bbu-nand-fcb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.7.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox