aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2015-06-04 14:45:20 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2015-06-12 13:26:21 +0100
commitbe93f216278d84d283187c95cef16c0b60b711b8 (patch)
tree07169e1e37e7ae400a494f928742c5664384b063 /audio
parent6484e422479c93f28e3f8a68258b0eacd3b31e6d (diff)
alsaaudio: Remove unused error handling of qemu_set_fd_handler
The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1433400324-7358-10-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/alsaaudio.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 74ead97d87..ed7655de86 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -266,31 +266,19 @@ static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask)
for (i = 0; i < count; ++i) {
if (pfds[i].events & POLLIN) {
- err = qemu_set_fd_handler (pfds[i].fd, alsa_poll_handler,
- NULL, hlp);
+ qemu_set_fd_handler (pfds[i].fd, alsa_poll_handler, NULL, hlp);
}
if (pfds[i].events & POLLOUT) {
if (conf.verbose) {
dolog ("POLLOUT %d %d\n", i, pfds[i].fd);
}
- err = qemu_set_fd_handler (pfds[i].fd, NULL,
- alsa_poll_handler, hlp);
+ qemu_set_fd_handler (pfds[i].fd, NULL, alsa_poll_handler, hlp);
}
if (conf.verbose) {
dolog ("Set handler events=%#x index=%d fd=%d err=%d\n",
pfds[i].events, i, pfds[i].fd, err);
}
- if (err) {
- dolog ("Failed to set handler events=%#x index=%d fd=%d err=%d\n",
- pfds[i].events, i, pfds[i].fd, err);
-
- while (i--) {
- qemu_set_fd_handler (pfds[i].fd, NULL, NULL, NULL);
- }
- g_free (pfds);
- return -1;
- }
}
hlp->pfds = pfds;
hlp->count = count;