diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h index d12736e14b696014ded68f3f1935696add69537f..adee6afd149044a42d7c8f097ad4a822b5b53779 100644 --- a/include/sound/sof/topology.h +++ b/include/sound/sof/topology.h @@ -237,7 +237,7 @@ struct sof_ipc_comp_process { /* reserved for future use */ uint32_t reserved[7]; - uint8_t data[0]; + uint8_t data[]; } __packed; /* frees components, buffers and pipelines diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index e72dcae5e7ee7ab2378a74579e396bee0b73de43..1d119d1dd69d519d4016d4097bc4a21b122b9e65 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -2164,7 +2164,7 @@ static int sof_process_load(struct snd_soc_component *scomp, int index, */ if (ipc_data_size) { for (i = 0; i < widget->num_kcontrols; i++) { - memcpy(&process->data + offset, + memcpy(&process->data[offset], wdata[i].pdata->data, wdata[i].pdata->size); offset += wdata[i].pdata->size;