summaryrefslogtreecommitdiffstats
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 12:35:28 +0100
commit0040476b0efa99ad0d4ffb81d8e882095420d288 (patch)
tree621230e170a0b594f07daf1d0b1c12494ea74488 /drivers/mtd/mtdchar.c
parentmtd: maps: Blackfin async: rename local funcs to avoid common clashes (diff)
downloadlinux-0040476b0efa99ad0d4ffb81d8e882095420d288.tar.xz
linux-0040476b0efa99ad0d4ffb81d8e882095420d288.zip
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,
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;