diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-10-27 15:48:47 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-27 15:48:47 -0700 |
| commit | 118b9305312b9f9f6de845bae040a4fb337472bf (patch) | |
| tree | 4ca517c8c182a9dbe2ce16be7638e7c9fe26b039 | |
| parent | bcd8ec9210c9048c14d934e16267ba79a894db09 (diff) | |
| parent | de352c72d1b401236db5f2c83b52c2df0b6b37ed (diff) | |
Merge "ASoC: qdsp6v2: fix potential bug of infinite loop"
| -rw-r--r-- | sound/soc/msm/qdsp6v2/q6asm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index 88c27339b299..0ea94cb52bfb 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -1221,8 +1221,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; } |
