mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
ALSA: hda - fix NULL-dereference in patch_realtek
Fix NULL-dereference when try to use alt_playback since those codecs which support multistreaming playback usually have more than 1 adc but the driver should create alt_capture when spec->stream_analog_alt_capture is also defined. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
20ec8b2463
commit
ce85c9ac8d
1 changed files with 1 additions and 1 deletions
|
@ -4424,7 +4424,7 @@ static int alc_build_pcms(struct hda_codec *codec)
|
|||
alc_pcm_null_stream;
|
||||
info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0;
|
||||
}
|
||||
if (spec->num_adc_nids > 1) {
|
||||
if (spec->num_adc_nids > 1 && spec->stream_analog_alt_capture) {
|
||||
info->stream[SNDRV_PCM_STREAM_CAPTURE] =
|
||||
*spec->stream_analog_alt_capture;
|
||||
info->stream[SNDRV_PCM_STREAM_CAPTURE].nid =
|
||||
|
|
Loading…
Reference in a new issue