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

This commit is contained in:
Linux Build Service Account 2017-01-06 04:11:09 -08:00 committed by Gerrit - the friendly Code Review server
commit 54699eb79c

View file

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