diff options
Diffstat (limited to 'resources/libraries')
-rw-r--r-- | resources/libraries/python/DUTSetup.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py index 419a4e291f..7eb19185e6 100644 --- a/resources/libraries/python/DUTSetup.py +++ b/resources/libraries/python/DUTSetup.py @@ -442,8 +442,10 @@ class DUTSetup: :type pci_addrs: list """ for pci_addr in pci_addrs: - if not driver or \ - DUTSetup.get_pci_dev_driver(node, pci_addr) != driver: + cur_driver = DUTSetup.get_pci_dev_driver(node, pci_addr) + if not cur_driver: + return + if not driver or cur_driver != driver: DUTSetup.pci_driver_unbind(node, pci_addr) @staticmethod |