21 Aug
2019
21 Aug
'19
3:59 p.m.
On Wed, Aug 21, 2019 at 03:32:52PM +0300, Jaska Uimonen wrote:
+static int sof_get_control_data(struct snd_sof_dev *sdev,
struct snd_soc_dapm_widget *widget,
struct sof_widget_data *wdata,
size_t *size)
{ const struct snd_kcontrol_new *kc; struct soc_mixer_control *sm; struct soc_bytes_ext *sbe; struct soc_enum *se;
- size_t size = 0; int i;
size += wdata[i].pdata->size;
/* don't accept 0 size for data */
if (!wdata[i].pdata->size)
return -EINVAL;
This should really be a separate change.
*size += wdata[i].pdata->size;
We appear to be requiring that the size passed in is zero initialized which is a bit unusual and seems likely to break even if it happens to work right now.