From: <gregkh@linuxfoundation.org>
To: dan.carpenter@oracle.com, cyrille.pitchen@atmel.com,
gregkh@linuxfoundation.org, marex@denx.de,
moritz.fischer@ettus.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "mtd: spi-nor: Fix some error codes in cqspi_setup_flash()" has been added to the 4.9-stable tree
Date: Mon, 23 Jan 2017 17:03:02 +0100 [thread overview]
Message-ID: <1485187382129157@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
mtd: spi-nor: Fix some error codes in cqspi_setup_flash()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mtd-spi-nor-fix-some-error-codes-in-cqspi_setup_flash.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 10ad1d754a434c024ce7eeb1cec9f69fd3ecc863 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 13 Oct 2016 11:30:39 +0300
Subject: mtd: spi-nor: Fix some error codes in cqspi_setup_flash()
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 10ad1d754a434c024ce7eeb1cec9f69fd3ecc863 upstream.
We return success or possibly uninitialized values on these error paths
instead of proper error codes.
Fixes: 140623410536 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/mtd/spi-nor/cadence-quadspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/mtd/spi-nor/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/cadence-quadspi.c
@@ -1077,12 +1077,14 @@ static int cqspi_setup_flash(struct cqsp
/* Get flash device data */
for_each_available_child_of_node(dev->of_node, np) {
- if (of_property_read_u32(np, "reg", &cs)) {
+ ret = of_property_read_u32(np, "reg", &cs);
+ if (ret) {
dev_err(dev, "Couldn't determine chip select.\n");
goto err;
}
if (cs >= CQSPI_MAX_CHIPSELECT) {
+ ret = -EINVAL;
dev_err(dev, "Chip select %d out of range.\n", cs);
goto err;
}
Patches currently in stable-queue which might be from dan.carpenter@oracle.com are
queue-4.9/st-hva-fix-some-error-handling-in-hva_hw_probe.patch
queue-4.9/mtd-spi-nor-fix-some-error-codes-in-cqspi_setup_flash.patch
queue-4.9/blackfin-check-devm_pinctrl_get-for-errors.patch
queue-4.9/mtd-spi-nor-off-by-one-in-cqspi_setup_flash.patch
queue-4.9/ieee802154-atusb-do-not-use-the-stack-for-buffers-to-make-them-dma-able.patch
reply other threads:[~2017-01-23 16:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1485187382129157@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=cyrille.pitchen@atmel.com \
--cc=dan.carpenter@oracle.com \
--cc=marex@denx.de \
--cc=moritz.fischer@ettus.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.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.