Merge branch 'stable-4.8' of git://git.infradead.org/users/pcmoore/audit
[cascardo/linux.git] / sound / core / pcm_native.c
index 9106d8e..c61fd50 100644 (file)
@@ -3161,7 +3161,7 @@ static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
 
        substream = pcm_file->substream;
        if (PCM_RUNTIME_CHECK(substream))
-               return -ENXIO;
+               return POLLOUT | POLLWRNORM | POLLERR;
        runtime = substream->runtime;
 
        poll_wait(file, &runtime->sleep, wait);
@@ -3200,7 +3200,7 @@ static unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
 
        substream = pcm_file->substream;
        if (PCM_RUNTIME_CHECK(substream))
-               return -ENXIO;
+               return POLLIN | POLLRDNORM | POLLERR;
        runtime = substream->runtime;
 
        poll_wait(file, &runtime->sleep, wait);