linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: marek.vasut@gmail.com, dwmw2@infradead.org,
	computersforpeace@gmail.com, richard@nod.at,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: cadence-quadspi: Fix the return value in case of error in 'cqspi_direct_read_execute()'
Date: Tue, 6 Nov 2018 00:00:59 +0100	[thread overview]
Message-ID: <20181106000059.4cc1d10e@bbrezillon> (raw)
In-Reply-To: <20181016071346.25383-1-christophe.jaillet@wanadoo.fr>

On Tue, 16 Oct 2018 09:13:46 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> We return 0 unconditionally in 'cqspi_direct_read_execute()'.
> However, 'ret' is set to some error codes in several error handling paths.
> 
> Return 'ret' instead to propagate the error code.
> 
> Fixes: ffa639e069fb ("mtd: spi-nor: cadence-quadspi: Add DMA support for direct mode reads")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Queued to the fixes branch after adjusting the subject to make it
shorter and adding a Cc-stable tag.

Thanks,

Boris

> ---
>  drivers/mtd/spi-nor/cadence-quadspi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c
> index 8e714fbfa521..6e9cbd1a0b6d 100644
> --- a/drivers/mtd/spi-nor/cadence-quadspi.c
> +++ b/drivers/mtd/spi-nor/cadence-quadspi.c
> @@ -996,7 +996,7 @@ static int cqspi_direct_read_execute(struct spi_nor *nor, u_char *buf,
>  err_unmap:
>  	dma_unmap_single(nor->dev, dma_dst, len, DMA_DEV_TO_MEM);
>  
> -	return 0;
> +	return ret;
>  }
>  
>  static ssize_t cqspi_read(struct spi_nor *nor, loff_t from,

      reply	other threads:[~2018-11-05 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16  7:13 [PATCH] mtd: spi-nor: cadence-quadspi: Fix the return value in case of error in 'cqspi_direct_read_execute()' Christophe JAILLET
2018-11-05 23:00 ` Boris Brezillon [this message]

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=20181106000059.4cc1d10e@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).