mtd: change positive error return into negative in mtd_do_writeoob()
PATCH 5/5 mtd: change positive error return into negative in mtd_do_writeoob()
From: Roel Kluin <[email protected]>
The error return should be negative
Signed-off-by Roel Kluin <[email protected]>
Cc David Woodhouse <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/mtd/mtdchar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdchar.c renamed from drivers/mtd/mtdchar.c~mtd-change-positive-error-return-into-negative-in-mtd_do_writeoob +1 -1
@@ -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;
_