From patchwork Fri Jan 29 09:35:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 43906 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3E80EB7D15 for ; Fri, 29 Jan 2010 20:31:58 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NanAN-00073N-Oj; Fri, 29 Jan 2010 09:29:27 +0000 Received: from mail-ew0-f221.google.com ([209.85.219.221]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NanAG-00071t-FE for linux-mtd@lists.infradead.org; Fri, 29 Jan 2010 09:29:25 +0000 Received: by ewy21 with SMTP id 21so1829047ewy.2 for ; Fri, 29 Jan 2010 01:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=J+dakllHNcUPkAhROsMyfyL7ubLbrYXZcjgJe2Edsr0=; b=fFTWecfxLLcmKv5FOzBgr1zh2MvdYAZcOvbYKKScGVvvRLYIM9gxvpTfhGJ8xnWe59 xld9p6w0XcqjGf4H7qn6Fk4RsUMgyZmAZ/hMxmU0K/iOf9NC3G1M+EFhxtLS6qI1SrGD gd2WZ7DpwrB/F7KnqcoINKhIOIFzPn4vLhK9E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=DvMbDo8RhphupMRCqQFrPGL+8GY/5m3YWKwIcXzF0vq2QKmnlUvkE1RpmDrz8R2IpJ 40Denzjt+MRiYTmZ77WG/oS529G/qy0DehnRaI50e3LZvPCNmL+aDIuoksXwax/BHLNk 8OS72nr0OO7uo0ZRZ//HW/EZJ+bE/yISX2gS0= Received: by 10.213.48.137 with SMTP id r9mr543283ebf.10.1264757357193; Fri, 29 Jan 2010 01:29:17 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 13sm1257727ewy.13.2010.01.29.01.29.15 (version=SSLv3 cipher=RC4-MD5); Fri, 29 Jan 2010 01:29:15 -0800 (PST) Message-ID: <4B62ABC8.7080607@gmail.com> Date: Fri, 29 Jan 2010 10:35:04 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: David Woodhouse , linux-mtd@lists.infradead.org, Andrew Morton , LKML Subject: [PATCH] mtd: Change positive error return into negative in mtd_do_writeoob() X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100129_042920_640043_4922F59B X-CRM114-Status: GOOD ( 15.84 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- _SUMMARY_ X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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;