From 82b35eb208e725177103a4257ce0c04c976ea786 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 31 Jan 2023 15:08:04 +0000 Subject: [PATCH] ti-tps6598x: Ignore the 'wrong' USB device class before calling ->setup() No functional change, but a few less i/o operations when inserting the dock. --- plugins/ti-tps6598x/fu-ti-tps6598x-device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/ti-tps6598x/fu-ti-tps6598x-device.c b/plugins/ti-tps6598x/fu-ti-tps6598x-device.c index 2bc084db3..a8bbf95f0 100644 --- a/plugins/ti-tps6598x/fu-ti-tps6598x-device.c +++ b/plugins/ti-tps6598x/fu-ti-tps6598x-device.c @@ -502,10 +502,6 @@ fu_ti_tps6598x_device_setup(FuDevice *device, GError **error) FuTiTps6598xDevice *self = FU_TI_TPS6598X_DEVICE(device); GUsbDevice *usb_device = fu_usb_device_get_dev(FU_USB_DEVICE(self)); - /* FuUsbDevice->setup */ - if (!FU_DEVICE_CLASS(fu_ti_tps6598x_device_parent_class)->setup(device, error)) - return FALSE; - /* there are two devices with the same VID:PID -- ignore the non-vendor one */ if (g_usb_device_get_device_class(usb_device) != G_USB_DEVICE_CLASS_VENDOR_SPECIFIC) { g_set_error(error, @@ -515,6 +511,10 @@ fu_ti_tps6598x_device_setup(FuDevice *device, GError **error) return FALSE; } + /* FuUsbDevice->setup */ + if (!FU_DEVICE_CLASS(fu_ti_tps6598x_device_parent_class)->setup(device, error)) + return FALSE; + /* get hardware details */ if (!fu_ti_tps6598x_device_ensure_version(self, error)) { g_prefix_error(error, "failed to read version: ");