diff options
author | miko <miko@cvs.openbsd.org> | 2018-09-07 04:03:31 +0000 |
---|---|---|
committer | miko <miko@cvs.openbsd.org> | 2018-09-07 04:03:31 +0000 |
commit | 31c8a1e48b6c674627b91cb746c26a55782ad4c5 (patch) | |
tree | 1910fe08a6cff09a1a0049086cb286e514024dcf /sys/dev | |
parent | 56c380d84f98e81ada69de68dc54a156edf10cab (diff) |
clarify that goto error in alloc_all_endpoints_fixed_ep() always returns
USBD_INVAL.
ok mpi@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/umidi.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c index 45e50d70adf..943be3b7b9a 100644 --- a/sys/dev/usb/umidi.c +++ b/sys/dev/usb/umidi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umidi.c,v 1.48 2018/09/07 03:54:12 miko Exp $ */ +/* $OpenBSD: umidi.c,v 1.49 2018/09/07 04:03:30 miko Exp $ */ /* $NetBSD: umidi.c,v 1.16 2002/07/11 21:14:32 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -430,7 +430,6 @@ free_all_endpoints(struct umidi_softc *sc) static usbd_status alloc_all_endpoints_fixed_ep(struct umidi_softc *sc) { - usbd_status err; struct umq_fixed_ep_desc *fp; struct umidi_endpoint *ep; usb_endpoint_descriptor_t *epd; @@ -458,14 +457,12 @@ alloc_all_endpoints_fixed_ep(struct umidi_softc *sc) if (!epd) { DPRINTF(("%s: cannot get endpoint descriptor(out:%d)\n", sc->sc_dev.dv_xname, fp->out_ep[i].ep)); - err = USBD_INVAL; goto error; } if (UE_GET_XFERTYPE(epd->bmAttributes)!=UE_BULK || UE_GET_DIR(epd->bEndpointAddress)!=UE_DIR_OUT) { printf("%s: illegal endpoint(out:%d)\n", sc->sc_dev.dv_xname, fp->out_ep[i].ep); - err = USBD_INVAL; goto error; } ep->sc = sc; @@ -485,14 +482,12 @@ alloc_all_endpoints_fixed_ep(struct umidi_softc *sc) if (!epd) { DPRINTF(("%s: cannot get endpoint descriptor(in:%d)\n", sc->sc_dev.dv_xname, fp->in_ep[i].ep)); - err = USBD_INVAL; goto error; } if (UE_GET_XFERTYPE(epd->bmAttributes)!=UE_BULK || UE_GET_DIR(epd->bEndpointAddress)!=UE_DIR_IN) { printf("%s: illegal endpoint(in:%d)\n", sc->sc_dev.dv_xname, fp->in_ep[i].ep); - err = USBD_INVAL; goto error; } ep->sc = sc; @@ -509,7 +504,7 @@ alloc_all_endpoints_fixed_ep(struct umidi_softc *sc) error: free(sc->sc_endpoints, M_USBDEV, 0); sc->sc_endpoints = NULL; - return err; + return USBD_INVAL; } static usbd_status |