summaryrefslogtreecommitdiff
path: root/tools/pci/pcitest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pci/pcitest.c')
-rw-r--r--tools/pci/pcitest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index 5fa5c2bdd427..6dce894667f6 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -47,15 +47,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) {