RE: [PATCH] ASoC: SOF: Don't allow pointer operations on unconfigured streams
From: Liao, Bard
Date: Sun Mar 29 2026 - 22:34:19 EST
> -----Original Message-----
> From: Mark Brown <broonie@xxxxxxxxxx>
> Sent: Saturday, March 28, 2026 12:48 AM
> To: Liao, Bard <bard.liao@xxxxxxxxx>
> Cc: Liam Girdwood <lgirdwood@xxxxxxxxx>; Peter Ujfalusi
> <peter.ujfalusi@xxxxxxxxxxxxxxx>; Bard Liao <yung-
> chuan.liao@xxxxxxxxxxxxxxx>; Ranjani Sridharan
> <ranjani.sridharan@xxxxxxxxxxxxxxx>; Daniel Baluta <daniel.baluta@xxxxxxx>;
> Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>; Pierre-Louis Bossart <pierre-
> louis.bossart@xxxxxxxxx>; Jaroslav Kysela <perex@xxxxxxxx>; Takashi Iwai
> <tiwai@xxxxxxxx>; Paul Olaru <paul.olaru@xxxxxxxxxxx>; Laurentiu Mihalcea
> <laurentiu.mihalcea@xxxxxxx>; sound-open-firmware@xxxxxxxxxxxxxxxx;
> linux-sound@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> stable@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] ASoC: SOF: Don't allow pointer operations on
> unconfigured streams
>
> On Fri, Mar 27, 2026 at 02:09:40AM +0000, Liao, Bard wrote:
>
> > > + if (!sstream->channels || !sstream->sample_container_bytes)
> > > + return -EBUSY;
>
> > Sorry, but why it is BUSY in this case?
>
> -EBUSY is often "wrong state". Could also be -EINVAL, it doesn't super
> make a difference I think - nobody should actually be doing this.
Thanks Mark for the explanation, it makes sense.