Skip to content

Commit 1932600

Browse files
Vidya Sagarkwilczynski
authored andcommitted
PCI: tegra194: Fix probe path for Endpoint mode
Tegra194 PCIe probe path is taking failure path in success case for Endpoint mode. Return success from the switch case instead of going into the failure path. Fixes: c57247f ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") Link: https://lore.kernel.org/linux-pci/20240408093053.3948634-1-vidyas@nvidia.com Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
1 parent 4cece76 commit 1932600

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,11 +2273,14 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev)
22732273
ret = tegra_pcie_config_ep(pcie, pdev);
22742274
if (ret < 0)
22752275
goto fail;
2276+
else
2277+
return 0;
22762278
break;
22772279

22782280
default:
22792281
dev_err(dev, "Invalid PCIe device type %d\n",
22802282
pcie->of_data->mode);
2283+
ret = -EINVAL;
22812284
}
22822285

22832286
fail:

0 commit comments

Comments
 (0)