Commit 26b9f2f
ASoC: rockchip: i2s: Fix NULL pointer dereference when pinctrl is not found
Commit a5450ab ("ASoC: rockchip: i2s: switch BCLK to GPIO") switched
BCLK to GPIO functions when probing the i2s bus interface, but missed
adding a check for when devm_pinctrl_get() returns an error. This can lead
to the following NULL pointer dereference on a rockpro64-v2 if there are no
"pinctrl" properties in the i2s device tree node.
Check that i2s->pinctrl is valid before attempting to search for the
bclk_on and bclk_off pinctrl states.
Fixes: a5450ab ("ASoC: rockchip: i2s: switch BCLK to GPIO")
Signed-off-by: Alexandru Elisei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent fc976f5 commit 26b9f2f
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
| 811 | + | |
812 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
813 | 816 | | |
814 | 817 | | |
815 | 818 | | |
| |||
0 commit comments