Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Fix return value. fo_poll is expected to return rev...



details:   https://anonhg.NetBSD.org/src/rev/b7c65c75beea
branches:  trunk
changeset: 827233:b7c65c75beea
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Oct 21 09:12:40 2017 +0000

description:
Fix return value.  fo_poll is expected to return revents on error.

diffstat:

 sys/dev/audio.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 6ba2f18552f3 -r b7c65c75beea sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Oct 21 09:02:23 2017 +0000
+++ b/sys/dev/audio.c   Sat Oct 21 09:12:40 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.411 2017/10/21 09:02:23 isaki Exp $        */
+/*     $NetBSD: audio.c,v 1.412 2017/10/21 09:12:40 isaki Exp $        */
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.411 2017/10/21 09:02:23 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.412 2017/10/21 09:12:40 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1866,18 +1866,18 @@
        dev_t dev;
 
        if (fp->f_audioctx == NULL)
-               return EIO;
+               return POLLERR;
 
        dev = fp->f_audioctx->dev;
 
        /* Don't bother with device level lock here. */
        sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
        if (sc == NULL)
-               return ENXIO;
+               return POLLERR;
        mutex_enter(sc->sc_lock);
        if (sc->sc_dying) {
                mutex_exit(sc->sc_lock);
-               return EIO;
+               return POLLERR;
        }
 
        switch (AUDIODEV(dev)) {



Home | Main Index | Thread Index | Old Index