From: Brian Norris <computersforpeace@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
b32955@freescale.com, b45815@freescale.com,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH 2/2] mtd: fsl-quadspi: Provide an error code on spi_nor_match_id() failure
Date: Wed, 22 Oct 2014 01:52:12 -0700 [thread overview]
Message-ID: <20141022085212.GM16128@brian-ubuntu> (raw)
In-Reply-To: <1413570669-30738-2-git-send-email-festevam@gmail.com>
On Fri, Oct 17, 2014 at 03:31:09PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> If spi_nor_match_id fails then we need to propagate an error code into 'ret',
> otherwise the probe function will succeed.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/mtd/spi-nor/fsl-quadspi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> index c5d10c3..4a2799f 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -911,8 +911,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
> goto map_failed;
>
> id = spi_nor_match_id(modalias);
> - if (!id)
> + if (!id) {
> + ret = -EINVAL;
> goto map_failed;
> + }
The call to spi_nor_match_id() was dropped, so this patch is not
necessary any more.
>
> ret = of_property_read_u32(np, "spi-max-frequency",
> &q->clk_rate);
Regards,
Brian
next prev parent reply other threads:[~2014-10-22 8:52 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 [this message]
2014-10-19 2:30 ` [PATCH 1/2] mtd: fsl-quadspi: Propagate the error from of_modalias_node() Huang Shijie
2014-10-22 8:50 ` 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=20141022085212.GM16128@brian-ubuntu \
--to=computersforpeace@gmail.com \
--cc=b32955@freescale.com \
--cc=b45815@freescale.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