Linux MultiMedia Card development
 help / color / mirror / Atom feed
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] mmc: omap_hsmmc: devm_pinctrl_get returns ERR_PTR upon error
Date: Sun, 20 Mar 2016 23:55:04 +0100	[thread overview]
Message-ID: <1458514504-21380-1-git-send-email-afenkart@gmail.com> (raw)

devm_pinctrl_get returns NULL if CONFIG_PINCTRL is not set,
returns ERR_PTR on error otherwise

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
---
 drivers/mmc/host/omap_hsmmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 62e421a..898878d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1842,7 +1842,7 @@ static int omap_hsmmc_configure_wake_irq(struct omap_hsmmc_host *host)
 	 */
 	if (host->pdata->controller_flags & OMAP_HSMMC_SWAKEUP_MISSING) {
 		struct pinctrl *p = devm_pinctrl_get(host->dev);
-		if (!p) {
+		if (!p || IS_ERR(p)) {
 			ret = -ENODEV;
 			goto err_free_irq;
 		}
-- 
2.7.0


             reply	other threads:[~2016-03-20 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-20 22:55 Andreas Fenkart [this message]
2016-03-21  8:41 ` [PATCH] 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=1458514504-21380-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