trivial: Copy the physical ID if unset for the device child

This commit is contained in:
Richard Hughes 2019-05-07 10:26:07 +01:00
parent 59c4d02698
commit 08ba5be69b

View File

@ -446,6 +446,9 @@ fu_device_add_child (FuDevice *self, FuDevice *child)
g_ptr_array_add (priv->children, g_object_ref (child));
/* copy from main device if unset */
if (fu_device_get_physical_id (child) == NULL &&
fu_device_get_physical_id (self) != NULL)
fu_device_set_physical_id (child, fu_device_get_physical_id (self));
if (fu_device_get_vendor (child) == NULL)
fu_device_set_vendor (child, fu_device_get_vendor (self));
if (fu_device_get_vendor_id (child) == NULL)