On Mon, May 18, 2015 at 04:56:01PM +0530, Vinod Koul wrote:
From: "Subhransu S. Prusty" subhransu.s.prusty@intel.com
Signed-off-by: Subhransu S. Prusty subhransu.s.prusty@intel.com Signed-off-by: Vinod Koul vinod.koul@intel.com
sound/soc/intel/common/sst-ipc.c | 15 +++++++++++++++ sound/soc/intel/common/sst-ipc.h | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/common/sst-ipc.c b/sound/soc/intel/common/sst-ipc.c index a7699f35a8d2..137bdfc35063 100644 --- a/sound/soc/intel/common/sst-ipc.c +++ b/sound/soc/intel/common/sst-ipc.c @@ -128,6 +128,21 @@ static int msg_empty_list_init(struct sst_generic_ipc *ipc) if (ipc->msg == NULL) return -ENOMEM;
- ipc->msg->tx_data = devm_kzalloc(ipc->dev,
sizeof(ipc->tx_data_max_size), GFP_KERNEL);
- if (ipc->msg->tx_data == NULL) {
kfree(ipc->msg);
return -ENOMEM;
- }
- ipc->msg->rx_data = devm_kzalloc(ipc->dev,
sizeof(ipc->rx_data_max_size), GFP_KERNEL);
- if (ipc->msg->rx_data == NULL) {
kfree(ipc->msg->tx_data);
kfree(ipc->msg);
return -ENOMEM;
- }
- for (i = 0; i < IPC_EMPTY_LIST_SIZE; i++) {
we need to allocate the memory for each message in the queue, i will send updated series now