trivial: Fix getting details about firmware for unknown devices

Fix a logic error when testing requirements; what was supposed to happen was
that a the firmware requirements were only processed when we had a FuDevice set
in the FuInstallTask, but instead we were falling through to the handler for
'unknown requirement type'.
This commit is contained in:
Richard Hughes 2018-08-06 11:03:06 +01:00
parent 38c7c334f4
commit 881f624eba

View File

@ -897,8 +897,11 @@ fu_engine_check_requirement (FuEngine *self, AsRequire *req, FuDevice *device, G
return fu_engine_check_requirement_id (self, req, error);
/* ensure firmware requirement */
if (device != NULL && as_require_get_kind (req) == AS_REQUIRE_KIND_FIRMWARE)
if (as_require_get_kind (req) == AS_REQUIRE_KIND_FIRMWARE) {
if (device == NULL)
return TRUE;
return fu_engine_check_requirement_firmware (self, req, device, error);
}
/* ensure hardware requirement */
if (as_require_get_kind (req) == AS_REQUIRE_KIND_HARDWARE)