Message ID | 20241213131318.19481-2-peter.ujfalusi@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ASoC: SOF: Correct sps->stream and cstream nullity management | expand |
On Fri, Dec 13, 2024 at 03:13:17PM +0200, Peter Ujfalusi wrote: > Fixes: ef8ba9f79953 ("ASoC: SOF: Add support for compress API for stream data/offset") > Cc: stable@vger.kernel.org This commit doesn't exist.
diff --git a/sound/soc/sof/stream-ipc.c b/sound/soc/sof/stream-ipc.c index 794c7bbccbaf..8262443ac89a 100644 --- a/sound/soc/sof/stream-ipc.c +++ b/sound/soc/sof/stream-ipc.c @@ -43,7 +43,7 @@ int sof_ipc_msg_data(struct snd_sof_dev *sdev, return -ESTRPIPE; posn_offset = stream->posn_offset; - } else { + } else if (sps->cstream) { struct sof_compr_stream *sstream = sps->cstream->runtime->private_data; @@ -51,6 +51,10 @@ int sof_ipc_msg_data(struct snd_sof_dev *sdev, return -ESTRPIPE; posn_offset = sstream->posn_offset; + + } else { + dev_err(sdev->dev, "%s: No stream opened\n", __func__); + return -EINVAL; } snd_sof_dsp_mailbox_read(sdev, posn_offset, p, sz);