diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index 4c5be77c211f..b7e3b6a64956 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -140,6 +140,7 @@ static int run_test(struct pci_test *test) } fflush(stdout); + return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */ } int main(int argc, char **argv) @@ -228,6 +229,5 @@ int main(int argc, char **argv) return -EINVAL; } - run_test(test); - return 0; + return run_test(test); }