Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbdLNGKO (ORCPT ); Thu, 14 Dec 2017 01:10:14 -0500 Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:47313 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbdLNGKM (ORCPT ); Thu, 14 Dec 2017 01:10:12 -0500 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 14 Dec 2017 07:10:11 +0100 X-ME-IP: 86.236.211.195 From: Christophe JAILLET To: kyungmin.park@samsung.com, dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, marek.vasut@gmail.com, richard@nod.at, cyrille.pitchen@wedev4u.fr Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 3/4 v3] mtd: onenand: samsung: Propagate the error returned by 'onenand_scan()' Date: Thu, 14 Dec 2017 07:03:51 +0100 Message-Id: <6a50f5e1872bedd649c5f0d0651243b5e4bb1184.1513230484.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 782 Lines: 30 Propagate the error code returned by 'onenand_scan()' instead of a hard-coded -EFAULT. Signed-off-by: Christophe JAILLET --- Cross-compiled tested-only v3: new patch in the serie --- drivers/mtd/onenand/samsung.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index b5497c5a35f1..206aa90140c9 100644 --- a/drivers/mtd/onenand/samsung.c +++ b/drivers/mtd/onenand/samsung.c @@ -921,8 +921,9 @@ static int s3c_onenand_probe(struct platform_device *pdev) } } - if (onenand_scan(mtd, 1)) - return -EFAULT; + err = onenand_scan(mtd, 1); + if (err) + return err; if (onenand->type != TYPE_S5PC110) { /* S3C doesn't handle subpage write */ -- 2.14.1