Skip to content

Commit 2a93192

Browse files
floatiouskwilczynski
authored andcommitted
misc: pci_endpoint_test: Fix pci_endpoint_test_bars_read_bar() error handling
Commit f26d37e ("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: f26d37e ("misc: pci_endpoint_test: Fix IOCTL return value") Signed-off-by: Niklas Cassel <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]>
1 parent a28d2f2 commit 2a93192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/misc/pci_endpoint_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ static int pci_endpoint_test_bars_read_bar(struct pci_endpoint_test *test,
382382
static int pci_endpoint_test_bars(struct pci_endpoint_test *test)
383383
{
384384
enum pci_barno bar;
385-
bool ret;
385+
int ret;
386386

387387
/* Write all BARs in order (without reading). */
388388
for (bar = 0; bar < PCI_STD_NUM_BARS; bar++)
@@ -398,7 +398,7 @@ static int pci_endpoint_test_bars(struct pci_endpoint_test *test)
398398
for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
399399
if (test->bar[bar]) {
400400
ret = pci_endpoint_test_bars_read_bar(test, bar);
401-
if (!ret)
401+
if (ret)
402402
return ret;
403403
}
404404
}

0 commit comments

Comments
 (0)