Skip to content

Commit

Permalink
[MTD] NAND: Missing fixups
Browse files Browse the repository at this point in the history
The oob fixups broke a return value and missed one patch from
the Mailing List.

Signed-off-by: Savin Zlobec <savin@epico.si>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Savin Zlobec authored and David Woodhouse committed Jun 21, 2006
1 parent 22ae813 commit 0d420f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ static int nand_write_oob_std(struct mtd_info *mtd, struct nand_chip *chip,

status = chip->waitfunc(mtd, chip);

return status;
return status & NAND_STATUS_FAIL ? -EIO : 0;
}

/**
Expand Down Expand Up @@ -1271,10 +1271,6 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
sndcmd = chip->ecc.read_oob(mtd, chip, page, sndcmd);
buf = nand_transfer_oob(chip, buf, ops);

readlen -= ops->ooblen;
if (!readlen)
break;

if (!(chip->options & NAND_NO_READRDY)) {
/*
* Apply delay or wait for ready/busy pin. Do this
Expand All @@ -1288,6 +1284,10 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
nand_wait_ready(mtd);
}

readlen -= ops->ooblen;
if (!readlen)
break;

/* Increment page address */
realpage++;

Expand Down

0 comments on commit 0d420f9

Please sign in to comment.