Imported Upstream version 1.0.28
[platform/upstream/alsa-lib.git] / src / control / hcontrol.c
index 8ffc434..7645c57 100644 (file)
@@ -696,7 +696,7 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
                pollio = 0;
                err_poll = poll(pfd, npfds, timeout);
                if (err_poll < 0) {
-                       if (errno == EINTR)
+                       if (errno == EINTR && !CTLINABORT(hctl->ctl))
                                continue;
                        return -errno;
                }
@@ -761,7 +761,6 @@ static int snd_hctl_handle_event(snd_hctl_t *hctl, snd_ctl_event_t *event)
        if (event->data.elem.mask & (SNDRV_CTL_EVENT_MASK_VALUE |
                                     SNDRV_CTL_EVENT_MASK_INFO)) {
                elem = snd_hctl_find_elem(hctl, &event->data.elem.id);
-               assert(elem);
                if (!elem)
                        return -ENOENT;
                res = snd_hctl_elem_throw_event(elem, event->data.elem.mask &