From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] gen_nand: Test if nr_chips field is valid
Date: Thu, 12 Aug 2010 04:53:55 +0200 [thread overview]
Message-ID: <1281581635-26213-2-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1281581635-26213-1-git-send-email-marek.vasut@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
drivers/mtd/nand/plat_nand.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 90e143e..317aff4 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -37,6 +37,11 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
struct resource *res;
int err = 0;
+ if (pdata->chip.nr_chips < 1) {
+ dev_err(&pdev->dev, "invalid number of chips specified\n");
+ return -EINVAL;
+ }
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;
--
1.7.1
WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marek.vasut@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk,
nico@fluxnic.net, kernel@wantstofly.org, kernel@pengutronix.de,
u.kleine-koenig@pengutronix.de, kaloz@openwrt.org, khc@pm.waw.pl,
tj@kernel.org, gregkh@suse.de, stable-review@kernel.org,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Artem.Bityutskiy@nokia.com,
David.Woodhouse@intel.com, ralf@linux-mips.org,
vapier@gentoo.org, michael.hennerich@analog.com,
barry.song@analog.com, sonic.zhang@analog.com,
cliff.cai@analog.com, uclinux-dist-devel@blackfin.uclinux.org,
yakovenkov@gmail.com, w.sang@pengutronix.de,
Marek Vasut <marek.vasut@gmail.com>
Subject: [PATCH 2/2] gen_nand: Test if nr_chips field is valid
Date: Thu, 12 Aug 2010 04:53:55 +0200 [thread overview]
Message-ID: <1281581635-26213-2-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1281581635-26213-1-git-send-email-marek.vasut@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
drivers/mtd/nand/plat_nand.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 90e143e..317aff4 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -37,6 +37,11 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
struct resource *res;
int err = 0;
+ if (pdata->chip.nr_chips < 1) {
+ dev_err(&pdev->dev, "invalid number of chips specified\n");
+ return -EINVAL;
+ }
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;
--
1.7.1
next prev parent reply other threads:[~2010-08-12 2:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 2:53 [PATCH 1/2 v2] ARM: Fix gen_nand probe structures contents Marek Vasut
2010-08-12 2:53 ` Marek Vasut
2010-08-12 2:53 ` Marek Vasut [this message]
2010-08-12 2:53 ` [PATCH 2/2] gen_nand: Test if nr_chips field is valid Marek Vasut
2010-08-12 2:57 ` [PATCH 1/2 v2] ARM: Fix gen_nand probe structures contents Marek Vasut
2010-08-12 2:57 ` Marek Vasut
2010-08-12 3:37 ` Mike Frysinger
2010-08-12 3:36 ` Mike Frysinger
2010-08-12 3:36 ` Mike Frysinger
2010-08-12 11:04 ` Marek Vasut
2010-08-12 11:04 ` Marek Vasut
2010-08-12 12:47 ` Mike Frysinger
2010-08-12 12:47 ` Mike Frysinger
2010-08-12 13:48 ` Marek Vasut
2010-08-12 13:48 ` Marek Vasut
2010-08-12 11:23 ` David Woodhouse
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=1281581635-26213-2-git-send-email-marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=linux-arm-kernel@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.