From: Roel Kluin Date: Fri, 29 Jan 2010 09:35:04 +0000 (+0100) Subject: mtd: change positive error return into negative X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0040476b0efa99ad0d4ffb81d8e882095420d288;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mtd: change positive error return into negative Signed-off-by: Roel Kluin Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 0a85085fe697..bce0a07cbac9 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;