Re: [PATCH] NAND: fix nand_write_oob_std return value

Thomas Gleixner
2006-06-21T11:41:56Z

On Wed, 2006-06-21 at 15:36 +0400, Alexander Belyakov wrote:
> It seems nand_write_oob_std should not return just status value
>
> Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com>
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 27083ed..79eae5d 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -1176,7 +1176,7 @@ static int nand_write_oob_std(struct mtd
>
> status = chip->waitfunc(mtd, chip);
>
> - return status;
> + return status & NAND_STATUS_FAIL ? -EIO : 0;
> }

You are the second one to notice. Already fixed.

Thanks anyway,

tglx