From: Fabio Estevam <festevam@gmail.com>
To: computersforpeace@gmail.com
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
b32955@freescale.com, b45815@freescale.com,
linux-mtd@lists.infradead.org
Subject: [PATCH 1/2] mtd: fsl-quadspi: Propagate the error from of_modalias_node()
Date: Fri, 17 Oct 2014 15:31:08 -0300 [thread overview]
Message-ID: <1413570669-30738-1-git-send-email-festevam@gmail.com> (raw)
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
next reply other threads:[~2014-10-17 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 18:31 Fabio Estevam [this message]
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 ` [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=1413570669-30738-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=b32955@freescale.com \
--cc=b45815@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=fabio.estevam@freescale.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 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.