From 09e8e5e7ef559ba5d6a6a6b187dbeb8f738b6d04 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 10 Mar 2020 12:06:09 +0000 Subject: [PATCH] vli: Only show the 2nd header if the device ID is valid Otherwise we get a scary warning about the CRC not being valid, when the block is just empty. --- plugins/vli/fu-vli-usbhub-device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/vli/fu-vli-usbhub-device.c b/plugins/vli/fu-vli-usbhub-device.c index 9cdc865fe..415388082 100644 --- a/plugins/vli/fu-vli-usbhub-device.c +++ b/plugins/vli/fu-vli-usbhub-device.c @@ -39,8 +39,10 @@ fu_vli_usbhub_device_to_string (FuVliDevice *device, guint idt, GString *str) if (self->update_protocol >= 0x2) { fu_common_string_append_kv (str, idt, "H1Hdr@0x0", NULL); fu_vli_usbhub_header_to_string (&self->hd1_hdr, idt + 1, str); - fu_common_string_append_kv (str, idt, "H2Hdr@0x1000", NULL); - fu_vli_usbhub_header_to_string (&self->hd2_hdr, idt + 1, str); + if (self->hd2_hdr.dev_id != 0xffff) { + fu_common_string_append_kv (str, idt, "H2Hdr@0x1000", NULL); + fu_vli_usbhub_header_to_string (&self->hd2_hdr, idt + 1, str); + } } }