From: Sascha Wildner Date: Sat, 31 Mar 2012 01:46:53 +0000 (+0200) Subject: lgue(4): Add missing braces and fix indentation. X-Git-Tag: v3.0.3~81 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/42257e4e4e89355397aad26713dad1b77986e913 lgue(4): Add missing braces and fix indentation. It was returning too early in some cases. While here, add an error message. --- diff --git a/sys/dev/netif/lgue/if_lgue.c b/sys/dev/netif/lgue/if_lgue.c index ccebe839ab..0b8780d3c4 100644 --- a/sys/dev/netif/lgue/if_lgue.c +++ b/sys/dev/netif/lgue/if_lgue.c @@ -379,12 +379,14 @@ lgue_intreof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status ifp = &sc->lgue_arpcom.ac_if; lwkt_serialize_enter(ifp->if_serializer); if (status != USBD_NORMAL_COMPLETION) { - if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) + if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) { lwkt_serialize_exit(ifp->if_serializer); return; + } + if_printf(ifp, "usb error on intr: %s\n", usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->lgue_ep[LGUE_ENDPT_INTR]); - lwkt_serialize_exit(ifp->if_serializer); + lwkt_serialize_exit(ifp->if_serializer); return; } lgue_intrstart(ifp);