ALSA: hda: Error out if invalid stream is being setup
authorCezary Rojewski <cezary.rojewski@intel.com>
Thu, 8 Dec 2022 14:26:35 +0000 (15:26 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Dec 2022 08:54:53 +0000 (09:54 +0100)
commit084ca216931ab9313e6fb862c2ec9ec5e0702cd5
tree4d539caa866358c6fd625b06e80d79fa58bd576f
parenta587601b55df505f38b18832d941e47dbbf084ce
ALSA: hda: Error out if invalid stream is being setup

Scenario when snd_hdac_stream_setup_periods() receives an instance of
struct hdac_stream with neither ->substream nor ->cstream initialized is
invalid.

Simultaneously addresses "uninitialized symbol 'dmab'" error reported by
Smatch.

Fixes: 3e9582267e3a ("ALSA: hda: Interrupt servicing and BDL setup for compress streams")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221208142635.1514944-1-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/hdac_stream.c