synaptics-prometheus: Fix enumeration of the config child

Do not manually call config setup before adding the parent.

The ->setup() action is called on children explicitly in fu_device_setup()
after the parent device has all the required properties.

Fixes https://github.com/fwupd/fwupd/issues/3364
This commit is contained in:
Richard Hughes 2021-06-15 17:18:55 +01:00 committed by Mario Limonciello
parent c0d0ce4e1a
commit 832231da9c

View File

@ -221,10 +221,6 @@ fu_synaprom_device_setup (FuDevice *device, GError **error)
!fu_device_has_flag (device, FWUPD_DEVICE_FLAG_IS_BOOTLOADER) &&
pkt.security[1] & FU_SYNAPROM_SECURITY1_PROD_SENSOR) {
g_autoptr(FuSynapromConfig) cfg = fu_synaprom_config_new (self);
if (!fu_device_setup (FU_DEVICE (cfg), error)) {
g_prefix_error (error, "failed to get config version: ");
return FALSE;
}
fu_device_add_child (FU_DEVICE (device), FU_DEVICE (cfg));
}