Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: SOF: ipc4-control: Set correct error code in refresh_bytes_control

Return -EINVAL in case the scontrol contains more data than the amount of
space available for it to store in sof_ipc4_refresh_bytes_control().

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-sound/aYXvFr-LVHVJSvS7@stanley.mountain/
Fixes: 2a28b5240f2b ("ASoC: SOF: ipc4-control: Add support for generic bytes control")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260209120239.6066-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Peter Ujfalusi and committed by
Mark Brown
f8f77491 3a7dbc72

+1
+1
sound/soc/sof/ipc4-control.c
··· 362 362 "%s: no space for data in %s (%zu, %zu)\n", 363 363 __func__, scontrol->name, msg->data_size, 364 364 scontrol->max_size - sizeof(*data)); 365 + ret = -EINVAL; 365 366 goto out; 366 367 } 367 368