From: Andreas Fenkart <afenkart@gmail.com>
To: linux-mmc@vger.kernel.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Andreas Fenkart <afenkart@gmail.com>
Subject: [PATCH v2] mmc: omap_hsmmc: devm_pinctrl_get returns ERR_PTR upon error
Date: Wed, 23 Mar 2016 20:28:36 +0100 [thread overview]
Message-ID: <1458761316-11706-1-git-send-email-afenkart@gmail.com> (raw)
keystone_defconfig can be compiled without PINCTRL support
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
---
drivers/mmc/host/omap_hsmmc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 62e421a..ecf3db8 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1841,9 +1841,14 @@ static int omap_hsmmc_configure_wake_irq(struct omap_hsmmc_host *host)
* and need to remux SDIO DAT1 to GPIO for wake-up from idle.
*/
if (host->pdata->controller_flags & OMAP_HSMMC_SWAKEUP_MISSING) {
+#ifndef CONFIG_PINCTRL
+ dev_info(host->dev, "missing pinctrl support\n");
+ ret = -ENODEV;
+ goto err_free_irq;
+#else
struct pinctrl *p = devm_pinctrl_get(host->dev);
- if (!p) {
- ret = -ENODEV;
+ if (IS_ERR(p)) {
+ ret = PTR_ERR(p);
goto err_free_irq;
}
if (IS_ERR(pinctrl_lookup_state(p, PINCTRL_STATE_DEFAULT))) {
@@ -1860,6 +1865,7 @@ static int omap_hsmmc_configure_wake_irq(struct omap_hsmmc_host *host)
goto err_free_irq;
}
devm_pinctrl_put(p);
+#endif
}
OMAP_HSMMC_WRITE(host->base, HCTL,
--
2.7.0
next reply other threads:[~2016-03-23 19:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 19:28 Andreas Fenkart [this message]
2016-03-23 20:10 ` [PATCH v2] mmc: omap_hsmmc: devm_pinctrl_get returns ERR_PTR upon error Dan Carpenter
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=1458761316-11706-1-git-send-email-afenkart@gmail.com \
--to=afenkart@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-mmc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox