diff options
Diffstat (limited to 'sys/dev/usb/ugen.c')
-rw-r--r-- | sys/dev/usb/ugen.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index aa9c673e2cf..8ed3dd5610b 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.64 2011/01/25 20:03:36 jakemsr Exp $ */ +/* $OpenBSD: ugen.c,v 1.65 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -1406,12 +1406,12 @@ ugenkqfilter(dev_t dev, struct knote *kn) sc = ugen_cd.cd_devs[UGENUNIT(dev)]; if (sc->sc_dying) - return (1); + return (ENXIO); /* XXX always IN */ sce = &sc->sc_endpoints[UGENENDPOINT(dev)][IN]; if (sce == NULL) - return (1); + return (EINVAL); switch (kn->kn_filter) { case EVFILT_READ: @@ -1432,7 +1432,7 @@ ugenkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &ugen_seltrue_filtops; break; default: - return (1); + return (EINVAL); } break; @@ -1442,7 +1442,7 @@ ugenkqfilter(dev_t dev, struct knote *kn) case UE_INTERRUPT: case UE_ISOCHRONOUS: /* XXX poll doesn't support this */ - return (1); + return (EINVAL); case UE_BULK: /* @@ -1453,12 +1453,12 @@ ugenkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &ugen_seltrue_filtops; break; default: - return (1); + return (EINVAL); } break; default: - return (1); + return (EINVAL); } kn->kn_hook = (void *)sce; |