summaryrefslogtreecommitdiff
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/samsung.c5
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 */