linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch 5/5] mtd: change positive error return into negative in mtd_do_writeoob()
@ 2010-02-02 22:43 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2010-02-02 22:43 UTC (permalink / raw)
  To: dwmw2; +Cc: roel.kluin, akpm, linux-mtd

From: Roel Kluin <roel.kluin@gmail.com>

The error return should be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/mtd/mtdchar.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/mtd/mtdchar.c~mtd-change-positive-error-return-into-negative-in-mtd_do_writeoob drivers/mtd/mtdchar.c
--- a/drivers/mtd/mtdchar.c~mtd-change-positive-error-return-into-negative-in-mtd_do_writeoob
+++ a/drivers/mtd/mtdchar.c
@@ -373,7 +373,7 @@ static int mtd_do_writeoob(struct file *
 	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;
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-02 22:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 22:43 [patch 5/5] mtd: change positive error return into negative in mtd_do_writeoob() akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).