public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V1] PCI: tegra194: Fix probe path for Endpoint mode
@ 2024-04-01 15:01 Vidya Sagar
  2024-04-02 12:39 ` Jon Hunter
  2024-04-08  9:30 ` [PATCH V2] " Vidya Sagar
  0 siblings, 2 replies; 7+ messages in thread
From: Vidya Sagar @ 2024-04-01 15:01 UTC (permalink / raw)
  To: lpieralisi, kw, robh, bhelgaas
  Cc: thierry.reding, jonathanh, linux-pci, linux-tegra, linux-kernel,
	kthota, mmaddireddy, vidyas, sagar.tv

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.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
index 4bba31502ce1..1a8178dc899a 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:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-17 11:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-01 15:01 [PATCH V1] PCI: tegra194: Fix probe path for Endpoint mode Vidya Sagar
2024-04-02 12:39 ` Jon Hunter
2024-04-08  9:30 ` [PATCH V2] " Vidya Sagar
2024-04-12 19:14   ` Bjorn Helgaas
2024-04-15 11:22     ` Vidya Sagar
2024-04-15 13:51   ` Manivannan Sadhasivam
2024-05-17 11:30   ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox