aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShengYi Hung <aokblast@FreeBSD.org>2025-08-05 09:41:17 +0000
committerShengYi Hung <aokblast@FreeBSD.org>2026-05-05 15:58:49 +0000
commit06271366982eb6fe59502fcdf95a1a22e0671d5f (patch)
tree216c92adb0ed0e0f3722e56dd13d442cddc57dfa
parentce9ced951a0b9d004a3b007d4ac6e9087a1301a2 (diff)
libusb: fix incorrect status type when completion on cancel the events
Reviewed by: lwhsu, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51736
-rw-r--r--lib/libusb/libusb10.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c
index 08e40541a907..517630900f34 100644
--- a/lib/libusb/libusb10.c
+++ b/lib/libusb/libusb10.c
@@ -1770,14 +1770,14 @@ libusb10_cancel_all_transfer_locked(struct libusb20_device *pdev, struct libusb_
if (sxfer == NULL)
continue;
/* complete pending transfer */
- libusb10_complete_transfer(xfer, sxfer, LIBUSB_TRANSFER_ERROR);
+ libusb10_complete_transfer(xfer, sxfer, LIBUSB_TRANSFER_CANCELLED);
}
while ((sxfer = TAILQ_FIRST(&dev->tr_head))) {
TAILQ_REMOVE(&dev->tr_head, sxfer, entry);
/* complete pending transfer */
- libusb10_complete_transfer(NULL, sxfer, LIBUSB_TRANSFER_ERROR);
+ libusb10_complete_transfer(NULL, sxfer, LIBUSB_TRANSFER_CANCELLED);
}
}