Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <dan.carpenter@oracle.com>, <marek.vasut@gmail.com>,
	<Cyrille.Pitchen@microchip.com>
Cc: vigneshr@ti.com, richard@nod.at, kernel-janitors@vger.kernel.org,
	linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
	computersforpeace@gmail.com, dwmw2@infradead.org
Subject: Re: [PATCH] mtd: spi-nor: Fix an error code in spi_nor_read_raw()
Date: Wed, 21 Aug 2019 08:21:45 +0000
Message-ID: <dd7530d3-33e9-7d7c-e29b-fe786b159394@microchip.com> (raw)
In-Reply-To: <20190815083252.GD27238@mwanda>



On 08/15/2019 11:32 AM, Dan Carpenter wrote:
> External E-Mail
> 
> 
> The problem is that if "ret" is negative then when we check if
> "ret > len", that condition is going to be true because of type
> promotion.  So this patch re-orders the code to check for negatives
> first and preserve those error codes.
> 
> Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Since the bug was not introduced in the previous release and we are quite late
for mtd/fixes,

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git,
spi-nor/next branch.

Thanks,
ta
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  8:32 Dan Carpenter
2019-08-15 10:35 ` walter harms
2019-08-15 14:41   ` Dan Carpenter
2019-08-21  7:35 ` Tudor.Ambarus
2019-08-21  8:21 ` Tudor.Ambarus [this message]

Reply instructions:

You may reply publically 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=dd7530d3-33e9-7d7c-e29b-fe786b159394@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=Cyrille.Pitchen@microchip.com \
    --cc=computersforpeace@gmail.com \
    --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=vigneshr@ti.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

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org linux-mtd@archiver.kernel.org
	public-inbox-index linux-mtd


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/ public-inbox