All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mtd: nand: fix return value in nand_erase_nand()
Date: Wed, 21 Mar 2018 09:03:20 +0000	[thread overview]
Message-ID: <20180321100320.70d14c17@bbrezillon> (raw)
In-Reply-To: <20180321081014.GC9826@mwanda>

Hi Dan,

On Wed, 21 Mar 2018 11:10:14 +0300
Dan Carpenter <dan.carpenter@oracle.com> 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@oracle.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mtd: nand: fix return value in nand_erase_nand()
Date: Wed, 21 Mar 2018 10:03:20 +0100	[thread overview]
Message-ID: <20180321100320.70d14c17@bbrezillon> (raw)
In-Reply-To: <20180321081014.GC9826@mwanda>

Hi Dan,

On Wed, 21 Mar 2018 11:10:14 +0300
Dan Carpenter <dan.carpenter@oracle.com> 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@oracle.com>

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

  reply	other threads:[~2018-03-21  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21  8:10 [PATCH] mtd: nand: fix return value in nand_erase_nand() Dan Carpenter
2018-03-21  8:10 ` Dan Carpenter
2018-03-21  9:03 ` Boris Brezillon [this message]
2018-03-21  9:03   ` Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180321100320.70d14c17@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dan.carpenter@oracle.com \
    --cc=dwmw2@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.