modem-manager: Fix a critical warning when issuing Secure Boot AT commands

Fixes https://github.com/fwupd/fwupd/issues/4998
This commit is contained in:
Richard Hughes 2022-09-05 09:38:11 +01:00
parent 4f3105369a
commit 92db5fc87a

View File

@ -1822,14 +1822,16 @@ fu_mm_device_setup_secboot_status_quectel(FuMmDevice *self)
return;
}
/* Try to query sec boot status with AT commands */
/* try to query sec boot status with AT commands */
for (guint i = 0; at_cmd[i] != NULL; i++) {
if (!fu_mm_device_at_cmd(self, at_cmd[i], TRUE, &error_local))
g_autoptr(GError) error_loop = NULL;
if (!fu_mm_device_at_cmd(self, at_cmd[i], TRUE, &error_loop)) {
g_debug("AT command failed (%s): %s",
at_cmd[i],
error_local->message);
else
error_loop->message);
} else {
return;
}
}
}