From: Fabio Estevam <festevam@gmail.com>
To: dwmw2@infradead.org
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
artem.bityutskiy@linux.intel.com, s.hauer@pengutronix.de,
linux-mtd@lists.infradead.org
Subject: [PATCH] nand: mxc_nand: Remove unneeded check for platform_get_resource()
Date: Sun, 21 Jul 2013 14:52:02 -0300 [thread overview]
Message-ID: <1374429122-15514-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@freescale.com>
devm_ioremap_resource() checks its arguments, so there is no need for
explicitly checking the return value from platform_get_resource().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mtd/nand/mxc_nand.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 18855ad..0581bd3 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1446,8 +1446,6 @@ static int mxcnd_probe(struct platform_device *pdev)
if (host->devtype_data->needs_ip) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
host->regs_ip = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(host->regs_ip))
return PTR_ERR(host->regs_ip);
@@ -1457,9 +1455,6 @@ static int mxcnd_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
}
- if (!res)
- return -ENODEV;
-
host->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(host->base))
return PTR_ERR(host->base);
--
1.8.1.2
next reply other threads:[~2013-07-21 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-21 17:52 Fabio Estevam [this message]
2013-08-02 15:34 ` [PATCH] nand: mxc_nand: Remove unneeded check for platform_get_resource() Artem Bityutskiy
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=1374429122-15514-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=fabio.estevam@freescale.com \
--cc=linux-mtd@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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