Skip to contentSkip to conversation

misc: pci_endpoint_test: Fix pci_endpoint_test_bars_read_bar() error handling

PATCH Superseded Niklas Cassel 1 participant 1 message Feb 4, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: pci_endpoint_test: Fix pci_endpoint_test_bars_read_bar() error handling

Commit f26d37ee9bda ("misc: pci_endpoint_test: Fix IOCTL return value") changed the return value of pci_endpoint_test_bars_read_bar() from false to -EINVAL on error, however, it failed to update the error handling.

Fixes f26d37ee9bda ("misc: pci_endpoint_test: Fix IOCTL return value")
---
 drivers/misc/pci_endpoint_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/pci_endpoint_test.c +1 -1
index d5ac71a49386..6b881478b295 100644
@@ -398,7 +398,7 @@ static int pci_endpoint_test_bars(struct pci_endpoint_test *test)
 	for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
 		if (test->bar[bar]) {
 			ret = pci_endpoint_test_bars_read_bar(test, bar);
-			if (!ret)
+			if (ret)
 				return ret;
 		}
 	}
Signature · 1 line
2.48.1