Merge "asoc : msm: Fix zero size pointer issue"
This commit is contained in:
commit
c1291c57d1
1 changed files with 6 additions and 0 deletions
|
@ -1567,6 +1567,12 @@ int q6asm_audio_client_buf_alloc_contiguous(unsigned int dir,
|
||||||
pr_err("%s: buffer already allocated\n", __func__);
|
pr_err("%s: buffer already allocated\n", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bufcnt == 0) {
|
||||||
|
pr_err("%s: invalid buffer count\n", __func__);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
mutex_lock(&ac->cmd_lock);
|
mutex_lock(&ac->cmd_lock);
|
||||||
buf = kzalloc(((sizeof(struct audio_buffer))*bufcnt),
|
buf = kzalloc(((sizeof(struct audio_buffer))*bufcnt),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue