Commit 0040476b authored by Roel Kluin's avatar Roel Kluin Committed by David Woodhouse

mtd: change positive error return into negative

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 4335c100
...@@ -373,7 +373,7 @@ static int mtd_do_writeoob(struct file *file, struct mtd_info *mtd, ...@@ -373,7 +373,7 @@ static int mtd_do_writeoob(struct file *file, struct mtd_info *mtd,
if (!mtd->write_oob) if (!mtd->write_oob)
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
else else
ret = access_ok(VERIFY_READ, ptr, length) ? 0 : EFAULT; ret = access_ok(VERIFY_READ, ptr, length) ? 0 : -EFAULT;
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment