diff options
author | Mark Brown <broonie@kernel.org> | 2020-03-27 20:29:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-27 20:29:20 +0300 |
commit | 1c521d7e62262793789845989edca57dea24eb7d (patch) | |
tree | dd891362188494b9d665229696ffb72187998a00 /sound/usb | |
parent | 8e3bb8ec11ed60963dbb70e69cf1a6806489dce3 (diff) | |
parent | 3d2cdb854659851d991f5b8e97e847e3fd240625 (diff) | |
download | linux-1c521d7e62262793789845989edca57dea24eb7d.tar.xz |
Merge branch 'asoc-5.7' into asoc-next
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/usx2y/usbusx2yaudio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 772f6f3ccbb1..37d290fe9d43 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c @@ -906,11 +906,12 @@ static const struct snd_pcm_ops snd_usX2Y_pcm_ops = */ static void usX2Y_audio_stream_free(struct snd_usX2Y_substream **usX2Y_substream) { - kfree(usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]); - usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK] = NULL; + int stream; - kfree(usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]); - usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE] = NULL; + for_each_pcm_streams(stream) { + kfree(usX2Y_substream[stream]); + usX2Y_substream[stream] = NULL; + } } static void snd_usX2Y_pcm_private_free(struct snd_pcm *pcm) |