mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
ALSA: seq: Fix poll() error return
commit a49a71f6e2 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8efea53580
commit
e078fab2a4
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user