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>
This commit is contained in:
Christophe JAILLET 2017-12-14 07:03:51 +01:00 committed by Boris Brezillon
parent ad99be4772
commit 0598344df0

View File

@ -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 */