linux/sound/soc/rockchip
Chen-Yu Tsai c3b5fd7fbb
ASoC: rockchip: i2s: Fix crash on missing pinctrl
Commit 44f362c2cc ("ASoC: rockchip: i2s: switch BCLK to GPIO") added
pinctrl lookups, but did not skip the lookup if there was no pinctrl
device tied to the I2S controller. As a result, the lookup was done
on an invalid pointer in such cases, causing a kernel panic.

Only do the subsequent pinctrl state lookups and switch if a pinctrl
device was found.

i2s_pinctrl_select_bclk_{on,off} already guard against missing pinctrl
device or pinctrl state, so those two functions aren't touched.

Fixes: 44f362c2cc ("ASoC: rockchip: i2s: switch BCLK to GPIO")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20220621185747.2782-1-wens@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-22 13:39:37 +01:00
..
Kconfig ASoC: rockchip: add support for i2s-tdm controller 2021-10-07 16:58:16 +01:00
Makefile Merge branch 'asoc-5.15' into asoc-5.16 2021-10-21 14:41:32 +01:00
rk3288_hdmi_analog.c ASoC: rockchip: simplify error handling 2022-06-06 12:35:20 +01:00
rk3399_gru_sound.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
rockchip_i2s_tdm.c ASoC: rockchip: Rename set_fmt_new back to set_fmt 2022-06-06 12:34:10 +01:00
rockchip_i2s_tdm.h ASoC: rockchip: add support for i2s-tdm controller 2021-10-07 16:58:16 +01:00
rockchip_i2s.c ASoC: rockchip: i2s: Fix crash on missing pinctrl 2022-06-22 13:39:37 +01:00
rockchip_i2s.h ASoC: rockchip: i2s: Add support for frame inversion 2021-08-26 13:59:40 +01:00
rockchip_max98090.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
rockchip_pdm.c ASoC: rockchip: pdm: Add support for path map 2021-09-13 01:44:10 +01:00
rockchip_pdm.h ASoC: rockchip: pdm: Add support for path map 2021-09-13 01:44:10 +01:00
rockchip_rt5645.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
rockchip_spdif.c ASoC: rockchip: spdif: Add support for rk3568 spdif 2021-08-26 13:56:56 +01:00
rockchip_spdif.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00