[Intel-gfx] [igt-dev] [PATCH i-g-t] lib/igt_device: Add support for accessing unbound VF PCI devices

Chris Wilson chris.p.wilson at intel.com
Fri Feb 18 16:03:01 UTC 2022


Quoting Janusz Krzysztofik (2022-02-18 15:19:35)
> @@ -206,15 +229,19 @@ static struct pci_device *__igt_device_get_pci_device(int fd)
>                 igt_warn("Couldn't find PCI device %04x:%02x:%02x:%02x\n",
>                          pci_addr.domain, pci_addr.bus,
>                          pci_addr.device, pci_addr.function);
> -               return NULL;
> +               goto cleanup;
>         }
>  
>         if (pci_device_probe(pci_dev)) {
>                 igt_warn("Couldn't probe PCI device\n");
> -               return NULL;
> +               goto cleanup;
>         }
>  
>         return pci_dev;
> +
> +cleanup:
> +       pci_system_cleanup();

This is a global cleanup of libpciaccess iirc, such that if anyone else
was using the library they would be affected.

> +       return NULL;
>  }


More information about the Intel-gfx mailing list