diff options
author | Hans de Goede <[email protected]> | 2022-01-06 12:01:23 +0100 |
---|---|---|
committer | Mark Brown <[email protected]> | 2022-01-06 13:55:47 +0000 |
commit | a2d6d84db2e7bcc831aed90f33334c70a1b060a3 (patch) | |
tree | cf6cfa90afc922f0aafdfb2e320dfbf8ec2c8182 /drivers/usb/cdns3/cdns3-debug.h | |
parent | e4c35e75209bda13e57c9bc8d280366c2b9275a5 (diff) |
ASoC: rt5640: Fix possible NULL pointer deref on resume
Commit 2b9c8d2b3c89 ("ASoC: rt5640: Add the HDA header support") adds
re-queuing of the jack_work on resume when rt5640->jd_src != 0.
But the jack_work will unconditionally deref rt5640->jack and that might
be NULL. E.g. the sound/soc/intel/boards/bytcr_rt5640.c machine driver
call snd_soc_component_set_jack(codec, NULL, NULL) from pre_suspend to
disable the IRQ to avoid spurious wakeups, so when rt5640_resume()
runs rt5640->jack will be NULL in this case.
Make the queueing of the work conditional on rt5640->jack instead of
on rt5640->jd_src to fix this.
Fixes: 2b9c8d2b3c89 ("ASoC: rt5640: Add the HDA header support")
Cc: Oder Chiou <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions