From: Christophe JAILLET Date: Thu, 14 Dec 2017 06:03:51 +0000 (+0100) Subject: mtd: onenand: samsung: Propagate the error returned by 'onenand_scan()' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0598344df0f093eba3c6e0af3caa934929c4b3aa;p=linux.git mtd: onenand: samsung: Propagate the error returned by 'onenand_scan()' Propagate the error code returned by 'onenand_scan()' instead of a hard-coded -EFAULT. Signed-off-by: Christophe JAILLET Signed-off-by: Boris Brezillon --- diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index c5416d6ad5719..7e84a1bb91f32 100644 --- a/drivers/mtd/onenand/samsung.c +++ b/drivers/mtd/onenand/samsung.c @@ -922,8 +922,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 */