aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pci/pcitest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pci/pcitest.c')
-rw-r--r--tools/pci/pcitest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index cb7a47dfd8b6..cb1e51fcc84e 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -36,15 +36,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) {
@@ -212,7 +212,7 @@ usage:
"\t-r Read buffer test\n"
"\t-w Write buffer test\n"
"\t-c Copy buffer test\n"
- "\t-s <size> Size of buffer {default: 100KB}\n",
+ "\t-s <size> Size of buffer {default: 100KB}\n"
"\t-h Print this help message\n",
argv[0]);
return -EINVAL;