linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: Change positive error return into negative in mtd_do_writeoob()
@ 2010-01-29  9:35 Roel Kluin
  2010-02-08 15:11 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-01-29  9:35 UTC (permalink / raw)
  To: David Woodhouse, linux-mtd, Andrew Morton, LKML

The error return should be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.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 5b081cb..01d5837 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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: Change positive error return into negative in mtd_do_writeoob()
  2010-01-29  9:35 [PATCH] mtd: Change positive error return into negative in mtd_do_writeoob() Roel Kluin
@ 2010-02-08 15:11 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-02-08 15:11 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linux-mtd, Andrew Morton, David Woodhouse, LKML

On Fri, 2010-01-29 at 10:35 +0100, Roel Kluin wrote:
> The error return should be negative
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
>  drivers/mtd/mtdchar.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Pushed to l2-mtd-2.6.git/master

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-08 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29  9:35 [PATCH] mtd: Change positive error return into negative in mtd_do_writeoob() Roel Kluin
2010-02-08 15:11 ` Artem Bityutskiy

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).