libxl: remove unnecessary check from libxl__device_pci_add()
authorPaul Durrant <pdurrant@amazon.com>
Tue, 8 Dec 2020 19:30:18 +0000 (19:30 +0000)
committerWei Liu <wl@xen.org>
Tue, 15 Dec 2020 16:24:23 +0000 (16:24 +0000)
commit4951b9ea807d4a4e5a54798d366b2ea3d6ca5060
tree56f7b247392d8b3e0d5d3b897ffc7708405e6a6e
parentfe91a3aadc038adbc2954e9a66e88493121a232e
libxl: remove unnecessary check from libxl__device_pci_add()

The code currently checks explicitly whether the device is already assigned,
but this is actually unnecessary as assigned devices do not form part of
the list returned by libxl_device_pci_assignable_list() and hence the
libxl_pci_assignable() test would have already failed.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libs/light/libxl_pci.c