From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W0Tcj-0002PS-BD for barebox@lists.infradead.org; Tue, 07 Jan 2014 10:11:09 +0000 From: Sascha Hauer Date: Tue, 7 Jan 2014 11:05:30 +0100 Message-Id: <1389089135-29986-5-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1389089135-29986-1-git-send-email-s.hauer@pengutronix.de> References: <1389089135-29986-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 4/9] UBI: Fix error path in scan_pool() To: barebox@lists.infradead.org Cc: Richard Weinberger From: Richard Weinberger We have to set "ret", not "err" in case of an error. Reported-and-tested-by: Richard Genoud Signed-off-by: Richard Weinberger Signed-off-by: Sascha Hauer --- drivers/mtd/ubi/fastmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 4d120ae..0a343fd 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -427,7 +427,7 @@ static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai, if (be32_to_cpu(ech->image_seq) != ubi->image_seq) { ubi_err("bad image seq: 0x%x, expected: 0x%x", be32_to_cpu(ech->image_seq), ubi->image_seq); - err = UBI_BAD_FASTMAP; + ret = UBI_BAD_FASTMAP; goto out; } -- 1.8.5.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox