dfu: Do not show an invalid warning on attach

For some hardware, it is quite expected the device just resets.
This commit is contained in:
Richard Hughes 2021-04-26 15:45:47 +01:00
parent 0a37abfce8
commit 5ad6fb2a27

View File

@ -1302,8 +1302,12 @@ fu_dfu_device_close (FuDevice *device, GError **error)
if (!g_usb_device_release_interface (usb_device,
(gint) priv->iface_number,
0, &error_local)) {
g_warning ("failed to release interface: %s",
error_local->message);
if (!g_error_matches (error_local,
G_USB_DEVICE_ERROR,
G_USB_DEVICE_ERROR_NO_DEVICE)) {
g_warning ("failed to release interface: %s",
error_local->message);
}
}
priv->claimed_interface = FALSE;
}