From patchwork Wed Mar 23 19:28:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 8653331 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0856CC0553 for ; Wed, 23 Mar 2016 19:28:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 346CD203DC for ; Wed, 23 Mar 2016 19:28:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 492BC20398 for ; Wed, 23 Mar 2016 19:28:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752629AbcCWT2n (ORCPT ); Wed, 23 Mar 2016 15:28:43 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37040 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbcCWT2m (ORCPT ); Wed, 23 Mar 2016 15:28:42 -0400 Received: by mail-wm0-f43.google.com with SMTP id p65so37438121wmp.0 for ; Wed, 23 Mar 2016 12:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=A91G3J+KZz588Cne/Ov8YXdjQz+aKtvcmf37y2tMa1Q=; b=RKvgjg4v7SMBgflRD+edn4WJgUhRbILv4O/i1FYwS7GLMVoGtYZfqnFxrn5Zb9M2z6 Yy93dVxup9vWp0Wl1kYG2iBEyT6Xkqc9FPXMkbirKhr4g76nQBtqj1EroOMlsKURCMAw +fKtPXDwjvEIQDT4dxgQa2uDzGrXEv5LNyeZQlebnPMBLpRKFPlO4XPg2+l+PmBuJ4XX xWySx0q6HSMFRMDm7XoFKaTpN0vCie7QRsISYnytJzK5yBi+fenVUtFdlrK1Ko64S3DX TApeDme5s/Tb31P1KVC5BFgsr74DtiBgxNg7of0ke7vcIOGZHGkTv4GWs8dw64VCdxk0 hPpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=A91G3J+KZz588Cne/Ov8YXdjQz+aKtvcmf37y2tMa1Q=; b=LlmdKIDFiskH6OrEOg1HiOiyh7orRJDvgXoqJqdrKNvRL3XKEmrdZSmutOHmb1SV4S 9VXGtrHa3vaqy8kLnLR4128cmzYSrV36FwDZD+hS6Y5fAcDltY8MzdPUnW7kTIB1nHgb yPpUdzdKeTau8O/9Fy5xs+9F72vS+UcAYwMPRAPAW7aw6CnI2Me90svlIPzKSOfjgbqM FGaPJm6wUdiAb32MTnuuAFupeMUb+KU9NYIJLIn5hIi/Yrr7O0b5G3bRBfkZ5e9sxQUr 9XNd0Fa6pdcX4hbusYuGmjaN7vqIqC+KfelkHYvtFq/r4Mcw2EyWSTJkPZeaGGuH+Kno NDXQ== X-Gm-Message-State: AD7BkJLTdnMDR/g5TBejmcxwsbEVx7F2LWSlxUvBT88bL21miM69qqrwhLLTC0ba8o5frQ== X-Received: by 10.194.171.66 with SMTP id as2mr5213561wjc.110.1458761321484; Wed, 23 Mar 2016 12:28:41 -0700 (PDT) Received: from localhost (ip-89-176-167-254.net.upcbroadband.cz. [89.176.167.254]) by smtp.gmail.com with ESMTPSA id js8sm3956741wjc.37.2016.03.23.12.28.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Mar 2016 12:28:40 -0700 (PDT) From: Andreas Fenkart To: linux-mmc@vger.kernel.org Cc: Dan Carpenter , Andreas Fenkart Subject: [PATCH v2] mmc: omap_hsmmc: devm_pinctrl_get returns ERR_PTR upon error Date: Wed, 23 Mar 2016 20:28:36 +0100 Message-Id: <1458761316-11706-1-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 2.7.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP keystone_defconfig can be compiled without PINCTRL support Reported-by: Dan Carpenter Signed-off-by: Andreas Fenkart --- 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,