From 2a231896fd8006d95a710670a6701c8ea300fb40 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 25 Aug 2022 12:04:25 +0100 Subject: [PATCH] trivial: Fix a couple of coding style issues --- plugins/lenovo-thinklmi/fu-plugin-lenovo-thinklmi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/lenovo-thinklmi/fu-plugin-lenovo-thinklmi.c b/plugins/lenovo-thinklmi/fu-plugin-lenovo-thinklmi.c index a5340d422..172876cdf 100644 --- a/plugins/lenovo-thinklmi/fu-plugin-lenovo-thinklmi.c +++ b/plugins/lenovo-thinklmi/fu-plugin-lenovo-thinklmi.c @@ -37,20 +37,22 @@ fu_plugin_lenovo_thinklmi_device_registered(FuPlugin *plugin, FuDevice *device) /* check if boot order lock is turned on */ attr = fu_context_get_bios_setting(ctx, BOOT_ORDER_LOCK); - if (!attr) { + if (attr == NULL) { g_debug("failed to find %s in cache\n", BOOT_ORDER_LOCK); return; } - if (g_strcmp0(fwupd_bios_setting_get_current_value(attr), "Enable") == 0) + if (g_strcmp0(fwupd_bios_setting_get_current_value(attr), "Enable") == 0) { fu_device_inhibit(device, "uefi-capsule-bootorder", "BootOrder is locked in firmware setup"); + } /* check if we're pending for a reboot */ - if (fu_context_get_bios_setting_pending_reboot(ctx)) + if (fu_context_get_bios_setting_pending_reboot(ctx)) { fu_device_inhibit(device, "uefi-capsule-pending-reboot", "UEFI BIOS settings update pending reboot"); + } } void