diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2022-01-09 11:40:56 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2022-01-09 11:43:03 +0100 |
commit | 0d2a42bc12aadec87df2ab4c1b93475fa4dd2469 (patch) | |
tree | be391599f386f027ee1b7d161e9a773003adf34c /src | |
parent | 73d7184088eab8c4ba0af021f838d6eb543c5b97 (diff) |
usb: Add warning for error during interrupt transfers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675
Diffstat (limited to 'src')
-rw-r--r-- | src/usb.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -352,6 +352,11 @@ static void interrupt_ep_cb(struct libusb_transfer *xfer) 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; |