From patchwork Sun Mar 20 22:55:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 8628731 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87FE99F6E1 for ; Sun, 20 Mar 2016 22:55:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8F7B20268 for ; Sun, 20 Mar 2016 22:55:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCD422026D for ; Sun, 20 Mar 2016 22:55:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751637AbcCTWzS (ORCPT ); Sun, 20 Mar 2016 18:55:18 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:33225 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754498AbcCTWzN (ORCPT ); Sun, 20 Mar 2016 18:55:13 -0400 Received: by mail-wm0-f46.google.com with SMTP id l68so132310668wml.0 for ; Sun, 20 Mar 2016 15:55:12 -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=FmKtZeL4d8gP9TmYdM5SxilmMI8rY9aYeKllACKYYjs=; b=k/Bu52uF+TwXY6w3Y0z4RlZBzel6HGvP/owbvQM2YRw038XLMThF1oDdG0qNHqkqxi ZXNunIh1XsZKRgCfmYZTd7sG0I9aJOIoDYAcGijAljDnA0LiRAFOhSUSN99peqw8u6kF 7oHcvte0FiUMsPuPyMUg8Zpj7y+AFdvh39XmW0jOtIFqEp8/zLqSqsFld8gK5DfJstpn B8fRwvIruHQoAEMxdm2wkx65h3O2eSBMaLyUKTxjv6zY3cux5TOuSSOVOBH8rlQzRl78 QzbY4PJAnyebs+G/rJeczQTvlfkdicYa8wvCoT07HhaDDgUXqYt3odS6rpdIc6uwIY1k Metg== 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=FmKtZeL4d8gP9TmYdM5SxilmMI8rY9aYeKllACKYYjs=; b=jwAOg0UC+5Gwh19ltNzFVL2XgbrYgYlHaXBhB0j/Sk369kJ6BJxnOpWAj8vXj7Wxt/ uCDT7HX9x5gqxtRziFWUriZo5ox9URXHfkPS/8JnBQJ2VcyWo06mxi0e5f0lMOTVUqgu eq4nbx4EI9q5akVynp+St9KeF6rVfO4DhjYLcUgkYnC1rderHX7TTQAwnY6yloan0Wol Sf/mGB1na67Y3Z/GP1xSbEvKhbSkprQDJrS+AuZbEFL1vYK5pEz3PHwPKn/LFnjL/e7v CIA4+uD8D9qyPWsWWZuUVPaSKx/7elbCsbC0xWZMKg6cpdXAiCSfCZaJDcc3JJ+hNHlq KR7A== X-Gm-Message-State: AD7BkJJOB521vV0ppZ6zp94mpj/vsQ1muICaJcBsJwHx94ZMMPuxpYZfx75VBDQlPuRemQ== X-Received: by 10.194.121.194 with SMTP id lm2mr26803528wjb.71.1458514511759; Sun, 20 Mar 2016 15:55:11 -0700 (PDT) Received: from localhost (ip-89-176-167-254.net.upcbroadband.cz. [89.176.167.254]) by smtp.gmail.com with ESMTPSA id h7sm9669384wmf.9.2016.03.20.15.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Mar 2016 15:55:11 -0700 (PDT) From: Andreas Fenkart To: linux-mmc@vger.kernel.org Cc: Dan Carpenter , Andreas Fenkart Subject: [PATCH] mmc: omap_hsmmc: devm_pinctrl_get returns ERR_PTR upon error Date: Sun, 20 Mar 2016 23:55:04 +0100 Message-Id: <1458514504-21380-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, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 devm_pinctrl_get returns NULL if CONFIG_PINCTRL is not set, returns ERR_PTR on error otherwise Reported-by: Dan Carpenter Signed-off-by: Andreas Fenkart --- 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; }