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 <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Charles Keepax 2016-05-04 14:59:08 +01:00 committed by Takashi Iwai
parent e099aeea63
commit 0b92b0cdbe
1 changed files with 1 additions and 4 deletions

View File

@ -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: