public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Huang Shijie <shijie8@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	b32955@freescale.com, b45815@freescale.com,
	computersforpeace@gmail.com, linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/2] mtd: fsl-quadspi: Propagate the error from of_modalias_node()
Date: Sun, 19 Oct 2014 10:30:10 +0800	[thread overview]
Message-ID: <20141019023007.GB1412@localhost.localdomain> (raw)
In-Reply-To: <1413570669-30738-1-git-send-email-festevam@gmail.com>

On Fri, Oct 17, 2014 at 03:31:08PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> The 'map_failed' label will return 'ret', so we need to assign the error
> code to 'ret', otherwise the probe function will return success.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/mtd/spi-nor/fsl-quadspi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> index 8d659a2..c5d10c3 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -906,7 +906,8 @@ static int fsl_qspi_probe(struct platform_device *pdev)
>  		nor->prepare = fsl_qspi_prep;
>  		nor->unprepare = fsl_qspi_unprep;
>  
> -		if (of_modalias_node(np, modalias, sizeof(modalias)) < 0)
> +		ret = of_modalias_node(np, modalias, sizeof(modalias));
> +		if (ret < 0)
>  			goto map_failed;
>  
>  		id = spi_nor_match_id(modalias);
> -- 
> 1.9.1
> 
thanks, please add my acks to both the patches.

Acked-by: Huang Shijie <shijie8@gmail.com>

  parent reply	other threads:[~2014-10-19  2:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 18:31 [PATCH 1/2] mtd: fsl-quadspi: Propagate the error from of_modalias_node() Fabio Estevam
2014-10-17 18:31 ` [PATCH 2/2] mtd: fsl-quadspi: Provide an error code on spi_nor_match_id() failure Fabio Estevam
2014-10-22  8:52   ` Brian Norris
2014-10-19  2:30 ` Huang Shijie [this message]
2014-10-22  8:50 ` [PATCH 1/2] mtd: fsl-quadspi: Propagate the error from of_modalias_node() Brian Norris

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=20141019023007.GB1412@localhost.localdomain \
    --to=shijie8@gmail.com \
    --cc=b32955@freescale.com \
    --cc=b45815@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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