Merge "ASoC: qdsp6v2: fix potential bug of infinite loop"

This commit is contained in:
Linux Build Service Account 2016-10-27 15:48:47 -07:00 committed by Gerrit - the friendly Code Review server
commit 118b930531

View file

@ -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;
}