From: Charles Keepax Date: Wed, 4 May 2016 13:59:08 +0000 (+0100) Subject: ALSA: compress: Use snd_compr_get_poll on error path X-Git-Tag: v4.7-rc1~116^2~4^2~17 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0b92b0cdbe419575b2233c08192b2ad28e7dbcfa;p=linux.git ALSA: compress: Use snd_compr_get_poll on error path We have a function that returns the appropriate flags for the stream direction, so we should use it. Signed-off-by: Charles Keepax Acked-by: Vinod Koul Signed-off-by: Takashi Iwai --- diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index a9933c07a6bf..5268546d6935 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -421,10 +421,7 @@ static unsigned int snd_compr_poll(struct file *f, poll_table *wait) retval = snd_compr_get_poll(stream); break; default: - if (stream->direction == SND_COMPRESS_PLAYBACK) - retval = POLLOUT | POLLWRNORM | POLLERR; - else - retval = POLLIN | POLLRDNORM | POLLERR; + retval = snd_compr_get_poll(stream) | POLLERR; break; } out: