diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-02-15 19:39:18 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-02-16 08:14:05 +0000 |
| commit | be522176951d8b542de9354f4ec9ac7603745b71 (patch) | |
| tree | d0775e187fa566b5f37105126ed2a214eced692a | |
| parent | e4bcfe4ebf03e321a5f8317491cdeea49e4f6357 (diff) | |
libusb: make libusb_hotplug_get_user_data actually return user_data
MFC After: 2 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D55291
| -rw-r--r-- | lib/libusb/libusb10_hotplug.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libusb/libusb10_hotplug.c b/lib/libusb/libusb10_hotplug.c index 9c46d4926bfa..359c818b5720 100644 --- a/lib/libusb/libusb10_hotplug.c +++ b/lib/libusb/libusb10_hotplug.c @@ -430,5 +430,7 @@ libusb_hotplug_get_user_data(struct libusb_context *ctx, } HOTPLUG_UNLOCK(ctx); - return (handle); + if (handle != NULL) + return (handle->user_data); + return (NULL); } |
