提交 0598344d 编写于 作者: C Christophe JAILLET 提交者: Boris Brezillon

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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
上级 ad99be47
...@@ -922,8 +922,9 @@ static int s3c_onenand_probe(struct platform_device *pdev) ...@@ -922,8 +922,9 @@ static int s3c_onenand_probe(struct platform_device *pdev)
} }
} }
if (onenand_scan(mtd, 1)) err = onenand_scan(mtd, 1);
return -EFAULT; if (err)
return err;
if (onenand->type != TYPE_S5PC110) { if (onenand->type != TYPE_S5PC110) {
/* S3C doesn't handle subpage write */ /* S3C doesn't handle subpage write */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册