2010-01-29 09:29:28

by Roel Kluin

[permalink] [raw]
Subject: [PATCH] mtd: Change positive error return into negative in mtd_do_writeoob()

The error return should be negative

Signed-off-by: Roel Kluin <[email protected]>
---
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;


2010-02-08 15:12:54

by Artem Bityutskiy

[permalink] [raw]
Subject: Re: [PATCH] mtd: Change positive error return into negative in mtd_do_writeoob()

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

Pushed to l2-mtd-2.6.git/master

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