diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-07-25 16:34:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-22 07:43:41 +0200 |
commit | e078fab2a4955be85afba5e04aecf85d776928c1 (patch) | |
tree | 5041970015f483da0bf69a904d1b0c0096bd775b /sound | |
parent | 8efea535809377f9e0b6639a155d143c449d3f54 (diff) | |
download | linux-stable-e078fab2a4955be85afba5e04aecf85d776928c1.tar.gz linux-stable-e078fab2a4955be85afba5e04aecf85d776928c1.tar.bz2 linux-stable-e078fab2a4955be85afba5e04aecf85d776928c1.zip |
ALSA: seq: Fix poll() error return
commit a49a71f6e25da2acc637fcd31e73debd96ca18f8 upstream.
The sanity checks in ALSA sequencer and OSS sequencer emulation codes
return falsely -ENXIO from poll callback. They should be EPOLLERR
instead.
This was caught thanks to the recent change to the return value.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/seq/oss/seq_oss.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_clientmgr.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c index 5f64d0d88320..e1f44fc86885 100644 --- a/sound/core/seq/oss/seq_oss.c +++ b/sound/core/seq/oss/seq_oss.c @@ -203,7 +203,7 @@ odev_poll(struct file *file, poll_table * wait) struct seq_oss_devinfo *dp; dp = file->private_data; if (snd_BUG_ON(!dp)) - return -ENXIO; + return EPOLLERR; return snd_seq_oss_poll(dp, file, wait); } diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 56ca78423040..6fd4b074b206 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -1101,7 +1101,7 @@ static __poll_t snd_seq_poll(struct file *file, poll_table * wait) /* check client structures are in place */ if (snd_BUG_ON(!client)) - return -ENXIO; + return EPOLLERR; if ((snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_INPUT) && client->data.user.fifo) { |