aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdchar.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2010-01-29 10:35:04 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 11:35:28 +0000
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 0a85085fe69..bce0a07cbac 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,
if (!mtd->write_oob)
ret = -EOPNOTSUPP;
else
- ret = access_ok(VERIFY_READ, ptr, length) ? 0 : EFAULT;
+ ret = access_ok(VERIFY_READ, ptr, length) ? 0 : -EFAULT;
if (ret)
return ret;