[Sound-open-firmware] [PATCH] dmic: fix size while copying DMIC params
The size argument for memcpy should be sizeof struct sof_ipc_dai_dmic_params.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- src/drivers/dmic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/drivers/dmic.c b/src/drivers/dmic.c index b66769c..97ca8b2 100644 --- a/src/drivers/dmic.c +++ b/src/drivers/dmic.c @@ -1032,8 +1032,8 @@ static int dmic_set_config(struct dai *dai, struct sof_ipc_dai_config *config) * sizeof(struct sof_ipc_dai_dmic_pdm_ctrl); prm = rzalloc(RZONE_SYS, SOF_MEM_CAPS_RAM, size);
- /* copy the command DAI config params and DMIC params */ - memcpy(prm, &config->dmic, sizeof(struct sof_ipc_dai_config)); + /* copy the DMIC params */ + memcpy(prm, &config->dmic, sizeof(struct sof_ipc_dai_dmic_params));
/* copy the pdm controller params from ipc */ for (i = 0; i < DMIC_HW_CONTROLLERS; i++) {
On Thu, 2018-06-14 at 10:45 -0700, Ranjani Sridharan wrote:
The size argument for memcpy should be sizeof struct sof_ipc_dai_dmic_params.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com
Applied.
Thanks
Liam
participants (2)
-
Liam Girdwood
-
Ranjani Sridharan