Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synaptics-mst: Do not allow updating a device with no customer ID #2923

Merged
merged 1 commit into from Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion plugins/synaptics-mst/fu-plugin-synaptics-mst.c
Expand Up @@ -71,7 +71,6 @@ fu_plugin_synaptics_mst_device_rescan (FuPlugin *plugin, FuDevice *device)
if (fu_device_has_flag (device, FWUPD_DEVICE_FLAG_REGISTERED))
fu_plugin_device_remove (plugin, device);
} else {
fu_device_add_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE);
fu_plugin_device_add (plugin, device);
}
}
Expand Down
8 changes: 7 additions & 1 deletion plugins/synaptics-mst/fu-synaptics-mst-device.c
Expand Up @@ -1177,7 +1177,13 @@ fu_synaptics_mst_device_rescan (FuDevice *device, GError **error)
guid3 = g_strdup_printf ("MST-%s", name_family);
fu_device_add_instance_id (FU_DEVICE (self), guid3);

/* success */
/* this is not a valid customer ID */
if ((self->board_id >> 8) == 0x0) {
fu_device_remove_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE);
fu_device_set_update_error (device, "cannot update as CustomerID is unset");
} else {
fu_device_add_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE);
}
return TRUE;
}

Expand Down