aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdchar.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2010-01-29 04:35:04 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 06:35:28 -0500
commit0040476b0efa99ad0d4ffb81d8e882095420d288 (patch)
tree621230e170a0b594f07daf1d0b1c12494ea74488 /drivers/mtd/mtdchar.c
parent4335c1003ed05d5d5a386cd8008fc06a6d424ca2 (diff)
mtd: change positive error return into negative
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r--drivers/mtd/mtdchar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 0a85085fe697..bce0a07cbac9 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -373,7 +373,7 @@ static int mtd_do_writeoob(struct file *file, struct mtd_info *mtd,
373 if (!mtd->write_oob) 373 if (!mtd->write_oob)
374 ret = -EOPNOTSUPP; 374 ret = -EOPNOTSUPP;
375 else 375 else
376 ret = access_ok(VERIFY_READ, ptr, length) ? 0 : EFAULT; 376 ret = access_ok(VERIFY_READ, ptr, length) ? 0 : -EFAULT;
377 377
378 if (ret) 378 if (ret)
379 return ret; 379 return ret;