From patchwork Thu Jul 1 22:12:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 57593 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 17792B7083 for ; Fri, 2 Jul 2010 06:13:50 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OUQ7P-0005pF-5F; Thu, 01 Jul 2010 20:12:19 +0000 Received: from mail-wy0-f177.google.com ([74.125.82.177]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OUQ7M-0005ma-9s for linux-mtd@lists.infradead.org; Thu, 01 Jul 2010 20:12:16 +0000 Received: by wyb32 with SMTP id 32so1797701wyb.36 for ; Thu, 01 Jul 2010 13:12:14 -0700 (PDT) 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=cVi1miZAmPlgjLlE66YqM6sC/lgA0EnWkSedjU++EQc=; b=DfZTpRi3lx9KY4w9mg4VTHeiXtyPIkXXT3n/ORTwazTiCOI1mYC6O1PTzPTXskvAwW TDLlBY3b8fkwy+j6KtwsfFrOo8zSkpWijEjB/URhfcj+0a5fyjwkVq15cgsNFD9f8kTV T5XPNuuQpgqnWrUk8TebooW1W8vr1axo0OYig= 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=SqVd2z0aSxamM9Dl4ifrZd+Cc8l+UMBIS1bjHe2kBi+mhRh8P9h5IfewmfUJZ0P3y1 6VYywKBQTrBbg7kvbL+byd44NK5xATx4O5FSq0Xil3ryRu82I3XHgZ3gvjjuQI7BzK5b xVXR4Q6UCIk4kAN7z/kIYIK57HXg3JB/4se8Q= Received: by 10.213.27.200 with SMTP id j8mr2996461ebc.29.1278015133755; Thu, 01 Jul 2010 13:12:13 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id v18sm13167837eeh.22.2010.07.01.13.12.11 (version=SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 13:12:11 -0700 (PDT) Message-ID: <4C2D12C1.3000801@gmail.com> Date: Fri, 02 Jul 2010 00:12:17 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4 MIME-Version: 1.0 To: David Woodhouse , linux-mtd@lists.infradead.org, Andrew Morton , LKML Subject: [PATCH] mtd: return -1 if verify failed X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100701_161216_441125_803B511D X-CRM114-Status: GOOD ( 13.61 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (roel.kluin[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 It should return -1 if the verify failed. Signed-off-by: Roel Kluin --- I think this needed, correct? diff --git a/drivers/mtd/tests/mtd_pagetest.c b/drivers/mtd/tests/mtd_pagetest.c index 6bc1b82..7414888 100644 --- a/drivers/mtd/tests/mtd_pagetest.c +++ b/drivers/mtd/tests/mtd_pagetest.c @@ -358,7 +358,7 @@ static int erasecrosstest(void) printk(PRINT_PREF "verify failed!\n"); errcnt += 1; ok = 0; - return err; + return -1; } printk(PRINT_PREF "erasing block %d\n", ebnum);