]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: sdhci-esdhc-imx: validate pinctrl before use it
authorPeng Fan <peng.fan@nxp.com>
Thu, 25 Feb 2021 03:10:04 +0000 (11:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 May 2021 06:37:23 +0000 (08:37 +0200)
commit3e712d5d8ed56a08f67907f90b611c362dbababa
tree18144647589e5423eded894ecc72b658362f7200
parentb5d6e36b54185db1c0d0290516ba81fa71e85c4d
mmc: sdhci-esdhc-imx: validate pinctrl before use it

[ 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 <haobo.chen@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/1614222604-27066-6-git-send-email-peng.fan@oss.nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/sdhci-esdhc-imx.c