diff options
author | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2016-05-09 12:46:31 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-05-30 16:19:41 +0100 |
commit | 5f22449344d9db35bcaf19c8e1bb4062188aeb09 (patch) | |
tree | 87623603e93df5a9932e0f63597a48dd60edbfda /net/bluetooth/hci_request.c | |
parent | 170abcaae8bec0a53f2f7708a83119ec42fb09e2 (diff) |
ASoC: rockchip-max98090: Fix NULL pointer dereference while accessing to jack.
Commit f2ed6b07645e ("ASoC: Make aux_dev more like a generic
component") caused a regression on this driver, since now a
kernel oops is seen when rockchip-mac98090 driver is loaded.
That commit changed the probing of aux_devs before checking
new DAI links, so for this driver rk_98090_headset_init is
called before rk_init and then the kernel oops due a NULL
pointer dereference inside rk_98090_headset_init function
since there is a call that tries to access the jack pointer
which has not been allocated yet.
This is the call chain that causes the crash:
rk_98090_headset_init
-> ts3a227e_enable_jack_detect
-> snd_jack_set_key
rk_init
-> snd_soc_card_jack_new
This patch moves the new jack object creation from rk_init
to rk_98090_headset_init function making sure the jack is
created before is accessed.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'net/bluetooth/hci_request.c')
0 files changed, 0 insertions, 0 deletions