diff options
| author | Ian Dowse <iedowse@FreeBSD.org> | 2002-10-30 01:18:58 +0000 |
|---|---|---|
| committer | Ian Dowse <iedowse@FreeBSD.org> | 2002-10-30 01:18:58 +0000 |
| commit | 8a7562d079c5b89a1592300df1bf20eca7b120e4 (patch) | |
| tree | 3f354ffeb9a09a8ee03f78caac1f8289faf9f468 /sys | |
| parent | 34faf20fae0048eb6d9fe192079f0f1743d5b866 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/usb/ulpt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 3494d07f59f2..b2640f44063c 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -471,6 +471,12 @@ static void ulpt_input(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct ulpt_softc *sc = priv; + u_int32_t count; + + /* Don't loop on errors or 0-length input. */ + usbd_get_xfer_status(xfer, NULL, NULL, &count, NULL); + if (status != USBD_NORMAL_COMPLETION || count == 0) + return; DPRINTFN(2,("ulpt_input: got some data\n")); /* Do it again. */ |
