diff options
author | Vidya Sagar <vidyas@nvidia.com> | 2024-04-08 12:30:53 +0300 |
---|---|---|
committer | Krzysztof Wilczyński <kwilczynski@kernel.org> | 2024-04-10 21:10:20 +0300 |
commit | 19326006a21da26532d982254677c892dae8f29b (patch) | |
tree | 4e1b866ff0c71aa33853b31bd4bd2d872d74f5c5 | |
parent | 4cece764965020c22cff7665b18a012006359095 (diff) | |
download | linux-19326006a21da26532d982254677c892dae8f29b.tar.xz |
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: c57247f940e8 ("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>
-rw-r--r-- | drivers/pci/controller/dwc/pcie-tegra194.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 1f7b662cb8e1..e440c09d1dc1 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -2273,11 +2273,14 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev) ret = tegra_pcie_config_ep(pcie, pdev); if (ret < 0) goto fail; + else + return 0; break; default: dev_err(dev, "Invalid PCIe device type %d\n", pcie->of_data->mode); + ret = -EINVAL; } fail: |