From 881f624ebafe306d2dc94e11358aa4e5b3b025c3 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 6 Aug 2018 11:03:06 +0100 Subject: [PATCH] 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'. --- src/fu-engine.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fu-engine.c b/src/fu-engine.c index 5afc01364..3bf3ae07e 100644 --- a/src/fu-engine.c +++ b/src/fu-engine.c @@ -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)