Merge tag 'pci-v5.3-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[sfrench/cifs-2.6.git] / tools / pci / pcitest.c
index cb7a47dfd8b6397d97f336aa8f73c3eb50fbbbbe..cb1e51fcc84e0b09d51400011ea9d28ebb4ab795 100644 (file)
@@ -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;