laforge submitted this change.
usb: Add warning for error during interrupt transfers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675
---
M src/usb.c
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/usb.c b/src/usb.c
index 32a249a..c67f5b9 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -352,6 +352,11 @@
struct e1_line *line = (struct e1_line *) xfer->user_data;
const struct ice1usb_irq *irq = (const struct ice1usb_irq *) xfer->buffer;
+ if (xfer->status != LIBUSB_TRANSFER_COMPLETED) {
+ LOGPLI(line, DE1D, LOGL_ERROR, "Error in Interrupt transfer\n");
+ goto out;
+ }
+
if (!xfer->actual_length) {
LOGPLI(line, DE1D, LOGL_ERROR, "Zero-Length Interrupt transfer\n");
goto out;
To view, visit change 26809. To unsubscribe, or for help writing mail filters, visit settings.