diff options
author | Mark Brown <broonie@kernel.org> | 2016-09-29 22:43:44 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-09-29 22:43:44 +0300 |
commit | 4a1ff03faf0562665c5b0d7130658bf13d65426e (patch) | |
tree | b63db1eaaaadd7fd2b9b205c0f6bd50148955878 /sound | |
parent | 195dee5647c76a4edcd762b82c626a990e349ff6 (diff) | |
parent | 61ab0d403bbd9d5f6e000e3b5734049141b91f6f (diff) | |
download | linux-4a1ff03faf0562665c5b0d7130658bf13d65426e.tar.xz |
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/intel/atom/sst/sst_ipc.c | 3 | ||||
-rw-r--r-- | sound/soc/intel/atom/sst/sst_pvt.c | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index 8afa6fe7b0b0..bfc889950bb2 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -267,6 +267,9 @@ static void process_fw_async_msg(struct intel_sst_drv *sst_drv_ctx, "Period elapsed rcvd for pipe id 0x%x\n", pipe_id); stream = &sst_drv_ctx->streams[str_id]; + /* If stream is dropped, skip processing this message*/ + if (stream->status == STREAM_INIT) + break; if (stream->period_elapsed) stream->period_elapsed(stream->pcm_substream); if (stream->compr_cb) diff --git a/sound/soc/intel/atom/sst/sst_pvt.c b/sound/soc/intel/atom/sst/sst_pvt.c index adb32fefd693..b1e6b8f34a6a 100644 --- a/sound/soc/intel/atom/sst/sst_pvt.c +++ b/sound/soc/intel/atom/sst/sst_pvt.c @@ -279,17 +279,15 @@ int sst_prepare_and_post_msg(struct intel_sst_drv *sst, if (response) { ret = sst_wait_timeout(sst, block); - if (ret < 0) { + if (ret < 0) goto out; - } else if(block->data) { - if (!data) - goto out; - *data = kzalloc(block->size, GFP_KERNEL); - if (!(*data)) { + + if (data && block->data) { + *data = kmemdup(block->data, block->size, GFP_KERNEL); + if (!*data) { ret = -ENOMEM; goto out; - } else - memcpy(data, (void *) block->data, block->size); + } } } out: |