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>
This commit is contained in:
parent
4335c1003e
commit
0040476b0e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user