devm_pinctrl_get returns NULL if CONFIG_PINCTRL is not set, returns ERR_PTR on error otherwise Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Andreas Fenkart <afenkart@xxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html