diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-12-14 07:03:51 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-12-18 17:37:51 +0100 |
commit | 0598344df0f093eba3c6e0af3caa934929c4b3aa (patch) | |
tree | 76f89a48f4658527d6fd0a64c140157921c6463f /drivers/mtd/onenand | |
parent | ad99be47726ccb0bcbc4b0fac12c20cba78e4c0d (diff) |
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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r-- | drivers/mtd/onenand/samsung.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index c5416d6ad571..7e84a1bb91f3 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 */ |