From 20447a00aede6104ad5ef40d5a8fa3d15c3bf8a5 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Tue, 11 Sep 2018 10:38:19 -0500 Subject: [PATCH] dell: Stop showing errors when no dock plugged in Since it matches the Realtek dongle, shouldn't show this error: failed to add USB device 0bda:8153: no dock detected All the time when that dongle is plugged in --- plugins/dell/fu-plugin-dell.c | 5 ++--- plugins/dell/fu-self-test.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/dell/fu-plugin-dell.c b/plugins/dell/fu-plugin-dell.c index 2100053b1..552c8aeb1 100644 --- a/plugins/dell/fu-plugin-dell.c +++ b/plugins/dell/fu-plugin-dell.c @@ -351,9 +351,8 @@ fu_plugin_usb_device_added (FuPlugin *plugin, buf.buf = NULL; if (!fu_dell_query_dock (data->smi_obj, &buf)) { - g_set_error_literal (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED, - "no dock detected"); - return FALSE; + g_debug ("no dock detected"); + return TRUE; } if (buf.record->dock_info_header.dir_version != 1) { diff --git a/plugins/dell/fu-self-test.c b/plugins/dell/fu-self-test.c index 298adbc0e..bf3546696 100644 --- a/plugins/dell/fu-self-test.c +++ b/plugins/dell/fu-self-test.c @@ -301,7 +301,7 @@ fu_plugin_dell_dock_func (void) DOCK_NIC_VID, DOCK_NIC_PID, NULL, FALSE); ret = fu_plugin_usb_device_added (plugin_dell, NULL, &error); - g_assert_false (ret); + g_assert_true (ret); g_clear_error (&error); g_assert_cmpint (devices->len, ==, 0);