fpc: Remove some dead code

Spotted by Coverity.
This commit is contained in:
Richard Hughes 2022-11-03 17:19:07 +00:00
parent 1e7d741601
commit f4637db935

View File

@ -188,16 +188,11 @@ fu_fpc_device_setup_mode(FuFpcDevice *self, GError **error)
g_usb_interface_get_protocol(intf) == FPC_DEVICE_DFU_MODE_PORT) { g_usb_interface_get_protocol(intf) == FPC_DEVICE_DFU_MODE_PORT) {
fu_device_add_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_IS_BOOTLOADER); fu_device_add_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_IS_BOOTLOADER);
return TRUE; return TRUE;
} else if (g_usb_interface_get_class(intf) == FPC_DEVICE_NORMAL_MODE_CLASS && }
if (g_usb_interface_get_class(intf) == FPC_DEVICE_NORMAL_MODE_CLASS &&
g_usb_interface_get_protocol(intf) == FPC_DEVICE_NORMAL_MODE_PORT) { g_usb_interface_get_protocol(intf) == FPC_DEVICE_NORMAL_MODE_PORT) {
fu_device_remove_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_IS_BOOTLOADER); fu_device_remove_flag(FU_DEVICE(self), FWUPD_DEVICE_FLAG_IS_BOOTLOADER);
return TRUE; return TRUE;
} else {
g_set_error(error,
G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
"device is not supported by this plugin");
return FALSE;
} }
} }
g_set_error_literal(error, FWUPD_ERROR, FWUPD_ERROR_NOT_FOUND, "no update interface found"); g_set_error_literal(error, FWUPD_ERROR, FWUPD_ERROR_NOT_FOUND, "no update interface found");