hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/soc/sof/intel/hda-dai.c
....@@ -212,6 +212,10 @@
212212 int stream_tag;
213213 int ret;
214214
215
+ link = snd_hdac_ext_bus_get_link(bus, codec_dai->component->name);
216
+ if (!link)
217
+ return -EINVAL;
218
+
215219 /* get stored dma data if resuming from system suspend */
216220 link_dev = snd_soc_dai_get_dma_data(dai, substream);
217221 if (!link_dev) {
....@@ -231,10 +235,6 @@
231235 substream->stream);
232236 if (ret < 0)
233237 return ret;
234
-
235
- link = snd_hdac_ext_bus_get_link(bus, codec_dai->component->name);
236
- if (!link)
237
- return -EINVAL;
238238
239239 /* set the stream tag in the codec dai dma params */
240240 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)