From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49D10C433ED for ; Mon, 3 May 2021 16:38:30 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA52B61403 for ; Mon, 3 May 2021 16:38:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA52B61403 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2t4lxJDjvZaWyrrHHRU5Enr2LpZc4JB7SpK3J5+Nzdw=; b=mHedVauKa+WQ6KAc6zPKmR5bI h5AA49BwPflXEM8luBQIdV9xln0mex5JAhwmWgkXiPyV9UpsGrkD373WnyAy0nmEqZganx1QHFHhg KgD/xLQL5o9koip2v42H3/JpTLGQRZhhQL4uTqsqOwV0p8g40TWQ8LyzoSQUPWh24w8E91i6RGduF EmXi2xADgOWJsC9b/wsHYqHWyuJzEMjtgwHyPQvtxyco3sCVb6jMORumYdU45H16C7luI/ISVmcUH oP9bmzIVEuHXjyQpyeuA4K5XaPPW1zbzYWGacULmRMTcExJUIRK/T9jKYZEWFgooTOrMikAjLlJXg MxMcKh5ZA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ldbZ5-00EOL8-Vb; Mon, 03 May 2021 16:37:00 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldbZ1-00EOKk-Hm for linux-arm-kernel@desiato.infradead.org; Mon, 03 May 2021 16:36:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=2bvrOe+p3YXBLQHb8QBvBU4jqdKhfjQW/Iu6GYufODQ=; b=49E1bJ2oy8mrLoKzEkeELlgjMR uIeTX36DUM15gaccmUcpA85SXlWBOK674JDpkF1ncZ6uGjEUW8Xvt2kt+5LBAgixHyeBy78KULsxy jitjkuat5EBQQl3g1eCy3AEQuaKfpBKUgvrl+2GVzkn4xXQOA3ZsyGZSIgmpAT6TsBOjun6HqH1DU Td7J9nZPtK2qgyhgi3iOfiApOIwR/CWhjRn7/5HXtslI9MkzX6GHYN7DDRZKbizBU0lzLC/48IQea i//inoWKJhyIr9gg2dzAIdS5K1ZSH1slKaWCid8QQE2VizS0+lFg0AOdGyiuVl61AgRx0l0dki8m9 cFviQonw==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldbYy-003FwV-Uo for linux-arm-kernel@lists.infradead.org; Mon, 03 May 2021 16:36:54 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D96F613B3; Mon, 3 May 2021 16:36:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620059812; bh=fh8NTrcVEp7XEynMX0wepwrZy+rJKZt3MliX/P9XDEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tCBpXsKMKNmzWfh/GCR+5Haci9uCINm6Lahldm4U3rV0fxCRtqt25oENQu22PKj9r HY/dJbNmICn9zUcQf4JyBMjq2VZxLbCBYovIXSLyfpysHWtYHmkkE5/N5qwL3VlddT Nl3+gKW+f9VSmQBXeTIUZRKs+yx0Qa4rN0lK5tFRPKrKTNLt1sE+JSWxjghhkCBanJ RC+ZYDJi5MAutQPMLFuCbbyT0PrRxDg5nMZ0je6wmKsMPRxMpbLdZis3E7qkdCUXBf 4HHm4Utjg6vgt0iIh6+BXPfcbmsc1db1NRFufwKs55ug1Gmdp19DGevUdnymQLLpk0 52gjO6XEGTzVA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Peng Fan , Bough Chen , Alice Guo , Ulf Hansson , Sasha Levin , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.12 063/134] mmc: sdhci-esdhc-imx: validate pinctrl before use it Date: Mon, 3 May 2021 12:34:02 -0400 Message-Id: <20210503163513.2851510-63-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210503163513.2851510-1-sashal@kernel.org> References: <20210503163513.2851510-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210503_093653_050278_F1E8901F X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan [ Upstream commit f410ee0aa2df050a9505f5c261953e9b18e21206 ] When imx_data->pinctrl is not a valid pointer, pinctrl_lookup_state will trigger kernel panic. When we boot Dual OS on Jailhouse hypervisor, we let the 1st Linux to configure pinmux ready for the 2nd OS, so the 2nd OS not have pinctrl settings. Similar to this commit b62eee9f804e ("mmc: sdhci-esdhc-imx: no fail when no pinctrl available"). Reviewed-by: Bough Chen Reviewed-by: Alice Guo Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1614222604-27066-6-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index a20459744d21..94327988da91 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1488,7 +1488,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, mmc_of_parse_voltage(np, &host->ocr_mask); - if (esdhc_is_usdhc(imx_data)) { + if (esdhc_is_usdhc(imx_data) && !IS_ERR(imx_data->pinctrl)) { imx_data->pins_100mhz = pinctrl_lookup_state(imx_data->pinctrl, ESDHC_PINCTRL_STATE_100MHZ); imx_data->pins_200mhz = pinctrl_lookup_state(imx_data->pinctrl, -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel