mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
Merge "ASoC: qdsp6v2: fix potential bug of infinite loop"
This commit is contained in:
commit
54699eb79c
1 changed files with 3 additions and 2 deletions
|
@ -1093,8 +1093,9 @@ int q6asm_audio_client_buf_alloc(unsigned int dir,
|
|||
struct audio_buffer *buf;
|
||||
size_t len;
|
||||
|
||||
if (!(ac) || ((dir != IN) && (dir != OUT))) {
|
||||
pr_err("%s: ac %pK dir %d\n", __func__, ac, dir);
|
||||
if (!(ac) || !(bufsz) || ((dir != IN) && (dir != OUT))) {
|
||||
pr_err("%s: ac %pK bufsz %d dir %d\n", __func__, ac, bufsz,
|
||||
dir);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue