mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
Merge ba56a64009 on remote branch
Change-Id: I822889bd320f8398a5cce4ffa6502416c09a9c4d
This commit is contained in:
commit
1fc2c1cc2f
2 changed files with 8 additions and 1 deletions
|
|
@ -782,6 +782,13 @@ static int msm_lsm_reg_model(struct snd_pcm_substream *substream,
|
|||
|
||||
q6lsm_sm_set_param_data(client, p_info, &offset, sm);
|
||||
|
||||
if ((sm->size - offset) < p_info->param_size) {
|
||||
dev_err(rtd->dev, "%s: user buff size is greater than expected\n",
|
||||
__func__);
|
||||
rc = -EINVAL;
|
||||
goto err_copy;
|
||||
}
|
||||
|
||||
/*
|
||||
* For set_param, advance the sound model data with the
|
||||
* number of bytes required by param_data.
|
||||
|
|
|
|||
|
|
@ -1336,7 +1336,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (size == 0 || size < prtd->pcm_count) {
|
||||
if ((size == 0 || size < prtd->pcm_count) && ((offset + size) < prtd->pcm_count)) {
|
||||
memset(bufptr + offset + size, 0, prtd->pcm_count - size);
|
||||
if (fbytes > prtd->pcm_count)
|
||||
size = xfer = prtd->pcm_count;
|
||||
|
|
|
|||
Loading…
Reference in a new issue