From patchwork Fri Jan 29 09:35:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: mtd: Change positive error return into negative in mtd_do_writeoob() Date: Thu, 28 Jan 2010 23:35:04 -0000 From: roel kluin X-Patchwork-Id: 43906 Message-Id: <4B62ABC8.7080607@gmail.com> To: David Woodhouse , linux-mtd@lists.infradead.org, Andrew Morton , LKML The error return should be negative Signed-off-by: Roel Kluin --- 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;