ASoC: core: Add check before setting no_buffer flag

Substream structure for either playback or capture is allocated only
if DAIs of a given DAI link are defined to support playback or capture.
Without this check, kernel will crash due to one of substream is NULL
when DAI link has no_host_mode set to  SND_SOC_DAI_LINK_NO_HOST.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
1 file changed