mtd: inftl: misplaced parenthesis in find_boot_record

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Feb 26 10:59:01 EST 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=35109451f18280000ce5e7b76ac8d29eb222823b
Commit:     35109451f18280000ce5e7b76ac8d29eb222823b
Parent:     932f5d21ccd2705f1fb22e8a9e0da42013dcee17
Author:     Roel Kluin <roel.kluin at gmail.com>
AuthorDate: Mon Feb 15 22:57:24 2010 +0100
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Feb 26 13:22:07 2010 +0000

    mtd: inftl: misplaced parenthesis in find_boot_record
    
    The parenthesis was misplaced, upon error a one was shown.
    
    [dwmw2: Fix the code not to do the assignment within the if() statement]
    Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/inftlmount.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
index 32e82ae..8f988d7 100644
--- a/drivers/mtd/inftlmount.c
+++ b/drivers/mtd/inftlmount.c
@@ -100,9 +100,10 @@ static int find_boot_record(struct INFTLrecord *inftl)
 		}
 
 		/* To be safer with BIOS, also use erase mark as discriminant */
-		if ((ret = inftl_read_oob(mtd, block * inftl->EraseSize +
-					  SECTORSIZE + 8, 8, &retlen,
-					  (char *)&h1) < 0)) {
+		ret = inftl_read_oob(mtd,
+				     block * inftl->EraseSize + SECTORSIZE + 8,
+				     8, &retlen,(char *)&h1);
+		if (ret < 0) {
 			printk(KERN_WARNING "INFTL: ANAND header found at "
 				"0x%x in mtd%d, but OOB data read failed "
 				"(err %d)\n", block * inftl->EraseSize,



More information about the linux-mtd-cvs mailing list