summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c7
-rw-r--r--sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c3
-rw-r--r--sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c2
-rw-r--r--sound/soc/msm/qdsp6v2/msm-qti-pp-config.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c b/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c
index 5866e46cc6a2..df32ede49ed0 100644
--- a/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c
+++ b/sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, 2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014,2016-2017, The Linux Foundation. All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
@@ -803,7 +803,7 @@ int msm_dolby_dap_param_to_get_control_get(struct snd_kcontrol *kcontrol,
__func__, copp_idx);
return -EINVAL;
}
- params_value = kzalloc(params_length, GFP_KERNEL);
+ params_value = kzalloc(params_length + param_payload_len, GFP_KERNEL);
if (!params_value) {
pr_err("%s, params memory alloc failed\n", __func__);
return -ENOMEM;
@@ -822,8 +822,7 @@ int msm_dolby_dap_param_to_get_control_get(struct snd_kcontrol *kcontrol,
pr_err("%s: invalid param id to set", __func__);
rc = -EINVAL;
} else {
- params_length = (dolby_dap_params_length[i] +
- DOLBY_PARAM_PAYLOAD_SIZE) *
+ params_length = dolby_dap_params_length[i] *
sizeof(uint32_t);
rc = adm_get_params(port_id, copp_idx,
DOLBY_BUNDLE_MODULE_ID,
diff --git a/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c b/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c
index bd0dcc4f107a..4de712a10f96 100644
--- a/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c
+++ b/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c
@@ -198,7 +198,8 @@ static void msm_ds2_dap_check_and_update_ramp_wait(int port_id, int copp_idx,
uint32_t param_payload_len = PARAM_PAYLOAD_SIZE * sizeof(uint32_t);
int rc = 0;
- update_params_value = kzalloc(params_length, GFP_KERNEL);
+ update_params_value = kzalloc(params_length + param_payload_len,
+ GFP_KERNEL);
if (!update_params_value) {
pr_err("%s: params memory alloc failed\n", __func__);
goto end;
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
index 6812552bbe2f..485ffa06f5bd 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
@@ -7945,7 +7945,7 @@ int msm_routing_get_rms_value_control(struct snd_kcontrol *kcontrol,
int *update_param_value;
uint32_t param_length = sizeof(uint32_t);
uint32_t param_payload_len = RMS_PAYLOAD_LEN * sizeof(uint32_t);
- param_value = kzalloc(param_length, GFP_KERNEL);
+ param_value = kzalloc(param_length + param_payload_len, GFP_KERNEL);
if (!param_value) {
pr_err("%s, param memory alloc failed\n", __func__);
return -ENOMEM;
diff --git a/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c b/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
index bdbbcfbd56c3..24c47f764a7d 100644
--- a/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
+++ b/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -345,7 +345,7 @@ static int msm_qti_pp_get_rms_value_control(struct snd_kcontrol *kcontrol,
uint32_t param_length = sizeof(uint32_t);
uint32_t param_payload_len = RMS_PAYLOAD_LEN * sizeof(uint32_t);
struct msm_pcm_routing_bdai_data msm_bedai;
- param_value = kzalloc(param_length, GFP_KERNEL);
+ param_value = kzalloc(param_length + param_payload_len, GFP_KERNEL);
if (!param_value) {
pr_err("%s, param memory alloc failed\n", __func__);
return -ENOMEM;