mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-03 06:09:51 +00:00
Never hang in g_udev_device_get_parent() if there is never a busnum
Spotted by Coverity.
This commit is contained in:
parent
44f816e1c6
commit
26e1b7c49b
@ -2116,7 +2116,7 @@ fu_udev_device_find_usb_device(FuUdevDevice *self, GError **error)
|
||||
g_return_val_if_fail(error == NULL || *error == NULL, NULL);
|
||||
|
||||
/* look at the current device and all the parent devices until we can find the USB data */
|
||||
while (TRUE) {
|
||||
while (udev_device != NULL) {
|
||||
g_autoptr(GUdevDevice) udev_device_parent = NULL;
|
||||
bus = g_udev_device_get_sysfs_attr_as_int(udev_device, "busnum");
|
||||
address = g_udev_device_get_sysfs_attr_as_int(udev_device, "devnum");
|
||||
|
Loading…
Reference in New Issue
Block a user