Skip to content
Snippets Groups Projects
Commit 81e730ac authored by Myron Stowe's avatar Myron Stowe
Browse files

misc: pci_endpoint_test: Fix pci_endpoint_test_bars_read_bar() error handling

JIRA: https://issues.redhat.com/browse/RHEL-83611


Upstream Status: 2a93192d2058507b2e39b590fc1efa0e03344136

commit 2a93192d2058507b2e39b590fc1efa0e03344136
Author: Niklas Cassel <cassel@kernel.org>
Date:   Tue Feb 4 12:06:41 2025 +0100

    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")
Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Link: https://lore.kernel.org/r/20250204110640.570823-2-cassel@kernel.org


Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>

Signed-off-by: default avatarMyron Stowe <mstowe@redhat.com>
parent d9c9bb29
No related branches found
No related tags found
No related merge requests found
......@@ -382,7 +382,7 @@ static int pci_endpoint_test_bars_read_bar(struct pci_endpoint_test *test,
static int pci_endpoint_test_bars(struct pci_endpoint_test *test)
{
enum pci_barno bar;
bool ret;
int ret;
/* Write all BARs in order (without reading). */
for (bar = 0; bar < PCI_STD_NUM_BARS; bar++)
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment