Re: [PATCH] mtd: nand: fix return value in nand_erase_nand()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

On Wed, 21 Mar 2018 11:10:14 +0300
Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

> The problem is that "ret" isn't initialized on the success path.
> 
> Fixes: cc4ac09da649 ("mtd: Stop updating erase_info->state and calling mtd_erase_callback()")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

I squashed those changes into the offending commit.

As usual, thanks for this report (and fix).

Boris

> 
> diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
> index 13dd67106859..87b72bf626ae 100644
> --- a/drivers/mtd/nand/raw/nand_base.c
> +++ b/drivers/mtd/nand/raw/nand_base.c
> @@ -4653,6 +4653,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
>  		}
>  	}
>  
> +	ret = 0;
>  erase_exit:
>  
>  	/* Deselect and wake up anyone waiting on the device */



-- 
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux