All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR()
@ 2017-04-10 13:54 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-04-10 13:54 UTC (permalink / raw)
  To: Ulf Hansson, Andreas Fenkart
  Cc: Sekhar Nori, Ravikumar Kattekola, Kishon Vijay Abraham I,
	Peter Ujfalusi, Tony Lindgren, Heiner Kallweit, linux-mmc,
	linux-omap, kernel-janitors

devm_pinctrl_get() returns error pointers, it never returns NULL.

Fixes: 455e5cd6f736 ("mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index bf64cf23aa59..8c39dccacf39 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1761,8 +1761,8 @@ 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) {
-			ret = -ENODEV;
+		if (IS_ERR(p)) {
+			ret = PTR_ERR(p);
 			goto err_free_irq;
 		}
 		if (IS_ERR(pinctrl_lookup_state(p, PINCTRL_STATE_DEFAULT))) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-12 14:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 13:54 [PATCH] mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR() Dan Carpenter
2017-04-10 13:54 ` Dan Carpenter
2017-04-10 14:05 ` Kishon Vijay Abraham I
2017-04-10 14:17   ` Kishon Vijay Abraham I
2017-04-12 14:11 ` Ulf Hansson
2017-04-12 14:11   ` Ulf Hansson

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.