mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
ASoC: core: Fix possible NULL pointer dereference
SSR is triggered when the system does not have a sound card registered, but has codecs. The pointer card sent from codec driver to snd_soc_card_change_online_state is NULL. Add null check for soc_card before dereferencing. Change-Id: I23342a6cbd9d53e62b2ea11dfe79aad3759df6f0 Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
9a9fb3e2cd
commit
a2ce4cbbe3
1 changed files with 2 additions and 1 deletions
|
|
@ -2933,7 +2933,8 @@ EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
|
|||
*/
|
||||
void snd_soc_card_change_online_state(struct snd_soc_card *soc_card, int online)
|
||||
{
|
||||
snd_card_change_online_state(soc_card->snd_card, online);
|
||||
if (soc_card && soc_card->snd_card)
|
||||
snd_card_change_online_state(soc_card->snd_card, online);
|
||||
}
|
||||
EXPORT_SYMBOL(snd_soc_card_change_online_state);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue