Skip to content

Commit 290e3e3

Browse files
committed
ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload
It is unexpected, but allowed to have no initial payload for a bytes control and the code is prepared to handle this case, but the size check missed this corner case. Update the check for minimal size to allow the initial size to be 0. Cc: stable@vger.kernel.org Fixes: a653820 ("ASoC: SOF: ipc4-topology: Correct the allocation size for bytes controls") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent f3ce593 commit 290e3e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2971,7 +2971,7 @@ static int sof_ipc4_control_load_bytes(struct snd_sof_dev *sdev, struct snd_sof_
29712971
return -EINVAL;
29722972
}
29732973

2974-
if (scontrol->priv_size < sizeof(struct sof_abi_hdr)) {
2974+
if (scontrol->priv_size && scontrol->priv_size < sizeof(struct sof_abi_hdr)) {
29752975
dev_err(sdev->dev,
29762976
"bytes control %s initial data size %zu is insufficient.\n",
29772977
scontrol->name, scontrol->priv_size);

0 commit comments

Comments
 (0)