mtd: change positive error return into negative
[safe/jmp/linux-2.6] / drivers / mtd / mtdchar.c
index 0a85085..bce0a07 100644 (file)
@@ -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;