mtd: change positive error return into negative

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Feb 25 07:59:04 EST 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=0040476b0efa99ad0d4ffb81d8e882095420d288
Commit:     0040476b0efa99ad0d4ffb81d8e882095420d288
Parent:     4335c1003ed05d5d5a386cd8008fc06a6d424ca2
Author:     Roel Kluin <roel.kluin at gmail.com>
AuthorDate: Fri Jan 29 10:35:04 2010 +0100
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Feb 25 11:35:28 2010 +0000

    mtd: change positive error return into negative
    
    Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/mtdchar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 0a85085..bce0a07 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;



More information about the linux-mtd-cvs mailing list