superio: Return with failure if setting GError

This commit is contained in:
Richard Hughes 2022-12-15 12:56:35 +00:00
parent a16d150ba9
commit 4cb7a20a68

View File

@ -287,6 +287,7 @@ fu_superio_it89_device_write_addr(FuSuperioDevice *self, guint addr, GBytes *fw,
FWUPD_ERROR_NOT_SUPPORTED, FWUPD_ERROR_NOT_SUPPORTED,
"write addr unaligned, got 0x%04x", "write addr unaligned, got 0x%04x",
(guint)addr); (guint)addr);
return FALSE;
} }
if (size % 2 != 0) { if (size % 2 != 0) {
g_set_error(error, g_set_error(error,
@ -294,6 +295,7 @@ fu_superio_it89_device_write_addr(FuSuperioDevice *self, guint addr, GBytes *fw,
FWUPD_ERROR_NOT_SUPPORTED, FWUPD_ERROR_NOT_SUPPORTED,
"write length not supported, got 0x%04x", "write length not supported, got 0x%04x",
(guint)size); (guint)size);
return FALSE;
} }
/* enable writes */ /* enable writes */