pci: Fix a -Wunused-but-set-variable warning
(cherry picked from commit 4db93fb278fce5f1034a9868413a641d9554214e)