Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1737204ybg; Sat, 19 Oct 2019 01:24:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7Pq2Ls9fR27iaP2rQj/zCpn/VhPD8C/afPkEKKclvYI/LkHjeNDRwl+Vg5ZBHsyaWzSYY X-Received: by 2002:a17:906:6146:: with SMTP id p6mr660521ejl.268.1571473476907; Sat, 19 Oct 2019 01:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571473476; cv=none; d=google.com; s=arc-20160816; b=WfobFbKZ5dJbTUG0mEq8MJYIByfBywNyyBQTY0i+r8l69uObv+GBnhmfbwLV3ZIrnK ceHUC9iovrISYuTeLeAalui8LgppMOa+Xhj59+ZpKAx4GaQauVrlgk2uCiNofxggnr5C Eck11dM5NvjLZqQhaimhvZg0IOywUT1zG3dwrcQQkl5t2tpge/j0wdRjkYmr72JeHHAq xmsqcB3bhTwGWcZ0SE/5FuRA/dHB1ijcFzYx6k0siz4CCXsjyTxWB2BzGVVUP1HKFJxR yBLFQGQHvYn9m+HhUI5Y+t/mS7+ODUxjPqIlS7CJRpO7dK3wqft/F42zBm/s00NfBF8j 6K+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=hULzerLYG/gcRIJMPWxpg7FxjyhoxEiB2hYB8bieHL8=; b=rEQaatY2ToiFkrTsBNEnmMYxKJqMSu88vj7RxfSDm8HDMUb7cKqq8pd5lRL5nekFDR BdKxBjIkg8OnA+QjFhL1NS79iNGsVrFcfAkB7LfPcko5rs19g1gjBkzCb+buJNWZDNaD lEBS7l+ZLnrVcSh8Dzt5A9pGtfcmAMPwuG6vEKhzCzNunnLuFn+eU+q83XbNkKhqqL+n AgQwrHpSaw4FJQwIkEYzsTioISDuxtmKYCbeCu4iBVeiiDkKJWlY6GxLzqA1bvjcyl8F FHoUHVk73pl7D/CqQToekEUSFnJHTEMtg0K/DU4o0ZoaJbKDhu5aEBfoBSQTbVxbAQcG Mjiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fGDqicuc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qq19si4852970ejb.85.2019.10.19.01.24.13; Sat, 19 Oct 2019 01:24:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fGDqicuc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410233AbfJRNNt (ORCPT + 99 others); Fri, 18 Oct 2019 09:13:49 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:46309 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729109AbfJRNNt (ORCPT ); Fri, 18 Oct 2019 09:13:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id e15so3349443pgu.13; Fri, 18 Oct 2019 06:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hULzerLYG/gcRIJMPWxpg7FxjyhoxEiB2hYB8bieHL8=; b=fGDqicuc+QPDMddr7IShi196Ot2soVvfxejuv4rrVhvzoHa3CwXmQkD9XtnyRmqavi OuRrKjXc14dWuv/D4tn1EJZj2uJHqC4AoyYZJIi55Rh+9Tkedr0qJbAZXxF6nTl3DYe6 N8/Is6ep9/0jxJrXYxbJyC+p2tajR51viaJAa4ej2yYBC/1OjShpTEyC0/3OG/+HxVHN tehT4bwNs8FBrl4T8ZUQI2epb5rgyM4b/nhR1NQPnvbJhUmMUtyNBSpn0bNWBFCBCln/ RH33LMePj+DRGNbexZCyCjHR8PWsPGQu1kwSV/pAdicex7/seIMCnWF8KcA9C5fdbYod Sj/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hULzerLYG/gcRIJMPWxpg7FxjyhoxEiB2hYB8bieHL8=; b=MHuCkApHBo1CnJQDim/nr7fdfsM7qMBZxDU+RAKZUthw23vTXG50F3h78zqjX2z4Te 0ys/6JML2WshgwWi0m65Z6HqhrTzEXN7qaToqDV6BRXkoKKmD4utOfY19E6sldSqOU15 QUiyh1F+Oe+nrwhLaTQ7Tp6Jse6zu0U7BdWFq2vVO8uZyq26iLTSWaZFm7ad5iUxfaWu Z90Ff52cKmKiB1ivrisQT+1k+GoXjrtq3MjEBipilNwBPhLP0Jp0oSqtre8LcbX3/x8T vziyXpbS9i7USIBPD73t21kTMDihWHFam1/TlXkY4MXFrZHBNZfCkYeh82x2CVwPjWUR 0d1A== X-Gm-Message-State: APjAAAUYZM+xdpAYRZK4K2NxCwjeZKJ8EsVZtt/uaA4+LZzphrSVkpEt 3EJz3J+ZeJpArpRNi11SMsk= X-Received: by 2002:a63:1c03:: with SMTP id c3mr9866955pgc.198.1571404428261; Fri, 18 Oct 2019 06:13:48 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id ce16sm6307205pjb.29.2019.10.18.06.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 06:13:47 -0700 (PDT) From: Chuhong Yuan Cc: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] mmc: renesas_sdhi: add checks for pinctrl_lookup_state Date: Fri, 18 Oct 2019 21:13:38 +0800 Message-Id: <20191018131338.11713-1-hslester96@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org renesas_sdhi_probe misses checks for pinctrl_lookup_state and may miss failures. Add checks for them to fix the problem. Signed-off-by: Chuhong Yuan --- drivers/mmc/host/renesas_sdhi_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index d4ada5cca2d1..dc5ad6632df3 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -694,8 +694,13 @@ int renesas_sdhi_probe(struct platform_device *pdev, if (!IS_ERR(priv->pinctrl)) { priv->pins_default = pinctrl_lookup_state(priv->pinctrl, PINCTRL_STATE_DEFAULT); + if (IS_ERR(priv->pins_default)) + return PTR_ERR(priv->pins_default); + priv->pins_uhs = pinctrl_lookup_state(priv->pinctrl, "state_uhs"); + if (IS_ERR(priv->pins_uhs)) + return PTR_ERR(priv->pins_uhs); } host = tmio_mmc_host_alloc(pdev, mmc_data); -- 2.20.1