Skip to content

Commit

Permalink
mtd: change positive error return into negative
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and David Woodhouse committed Feb 25, 2010
1 parent 4335c10 commit 0040476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/mtdchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0040476

Please sign in to comment.