diff options
author | Richard Hughes <richard@hughsie.com> | 2023-02-01 14:33:27 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2023-02-01 16:24:02 +0000 |
commit | 4db790b78afc0642be95416cccba9c05b7ca5c5a (patch) | |
tree | 47e4caebdb110c869cd7f26398e0ebced7a90d22 /gusb/gusb-context.c | |
parent | e62f8f76d0bbf755ed5d90f44c10ae8f58605202 (diff) | |
download | gusb-4db790b78afc0642be95416cccba9c05b7ca5c5a.tar.gz |
Save the libusb error if libusb_submit_transfer() fails
If the return code is LIBUSB_ERROR_NO_DEVICE we want to record that.
Diffstat (limited to 'gusb/gusb-context.c')
-rw-r--r-- | gusb/gusb-context.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gusb/gusb-context.c b/gusb/gusb-context.c index b233209..f8ec3cf 100644 --- a/gusb/gusb-context.c +++ b/gusb/gusb-context.c @@ -401,7 +401,8 @@ g_usb_context_load_with_tag(GUsbContext *self, { GUsbContextPrivate *priv = GET_PRIVATE(self); JsonArray *json_array; - g_autoptr(GPtrArray) devices_to_remove = g_ptr_array_new_with_free_func((GDestroyNotify) g_object_unref); + g_autoptr(GPtrArray) devices_to_remove = + g_ptr_array_new_with_free_func((GDestroyNotify)g_object_unref); g_return_val_if_fail(G_USB_IS_CONTEXT(self), FALSE); g_return_val_if_fail(json_object != NULL, FALSE); |