diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index 8ca1c62bc06d..7002df55826f 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -42,15 +42,15 @@ struct pci_test { unsigned long size; }; -static void run_test(struct pci_test *test) +static int run_test(struct pci_test *test) { - long ret; + int ret = -EINVAL; int fd; fd = open(test->device, O_RDWR); if (fd < 0) { perror("can't open PCI Endpoint Test device"); - return; + return -ENODEV; } if (test->barnum >= 0 && test->barnum <= 5) {