From: Fabio Estevam <festevam@gmail.com>
To: linus.walleij@linaro.org
Cc: shawn.guo@linaro.org, linux-kernel@vger.kernel.org,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource()
Date: Sun, 21 Jul 2013 22:16:21 -0300 [thread overview]
Message-ID: <1374455781-17905-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@freescale.com>
As devm_ioremap_resource() is used on probe, there is no need to explicitly
check the return value from platform_get_resource(), as this is something that
devm_ioremap_resource() takes care by itself.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/pinctrl/pinctrl-imx.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index 57a4eb0..dea739a 100644
--- a/drivers/pinctrl/pinctrl-imx.c
+++ b/drivers/pinctrl/pinctrl-imx.c
@@ -580,9 +580,6 @@ int imx_pinctrl_probe(struct platform_device *pdev,
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENOENT;
-
ipctl->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(ipctl->base))
return PTR_ERR(ipctl->base);
--
1.8.1.2
next reply other threads:[~2013-07-22 1:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 1:16 Fabio Estevam [this message]
2013-07-22 12:49 ` [PATCH] pinctrl: pinctrl-imx: Remove unneeded check for platform_get_resource() Shawn Guo
2013-07-22 23:21 ` Linus Walleij
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=1374455781-17905-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shawn.guo@linaro.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