Skip to content

Commit

Permalink
trivial: Fix a critical warning when installing FF2 firmware
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Hughes <richard@hughsie.com>
  • Loading branch information
haoweilo authored and hughsie committed May 16, 2024
1 parent 8fb5560 commit b8bdae1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/fpc/fu-fpc-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,6 @@ fu_fpc_device_write_firmware(FuDevice *device,
g_autoptr(GError) error_local = NULL;
g_autoptr(FuChunkArray) chunks = NULL;

/* progress */
fu_progress_set_id(progress, G_STRLOC);
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_BUSY, 1, "init");
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_WRITE, 95, NULL);
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_BUSY, 5, "check");

/* new format */
if (FU_IS_FPC_FF2_FIRMWARE(firmware)) {
return fu_fpc_device_write_ff2_firmware(self,
Expand All @@ -592,6 +586,12 @@ fu_fpc_device_write_firmware(FuDevice *device,
error);
}

/* progress */
fu_progress_set_id(progress, G_STRLOC);
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_BUSY, 1, "init");
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_WRITE, 95, NULL);
fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_BUSY, 5, "check");

/* write old fw format */
stream = fu_firmware_get_stream(firmware, error);
if (stream == NULL)
Expand Down

0 comments on commit b8bdae1

Please sign in to comment.