diff options
| author | Siddharth Vadapalli <s-vadapalli@ti.com> | 2025-10-29 13:34:51 +0530 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2025-11-13 12:20:46 -0600 |
| commit | 95d9c3f0e4546eaec0977f3b387549a8463cd49f (patch) | |
| tree | 28501c0bf5b28eb002c7d24139bb9214c380a5af /drivers/pci/controller/dwc/pcie-stm32.c | |
| parent | 3a8660878839faadb4f1a6dd72c3179c1df56787 (diff) | |
PCI: keystone: Exit ks_pcie_probe() for invalid mode
Commit under Fixes introduced support for PCIe EP mode on AM654x platforms.
When the mode happens to be either "DW_PCIE_RC_TYPE" or "DW_PCIE_EP_TYPE",
the PCIe Controller is configured accordingly. However, when the mode is
neither of them, an error message is displayed, but the driver probe
succeeds. Since this "invalid" mode is not associated with a functional
PCIe Controller, the probe should fail.
Fix the behavior by exiting "ks_pcie_probe()" with the return value of
"-EINVAL" in addition to displaying the existing error message when the
mode is invalid.
Fixes: 23284ad677a9 ("PCI: keystone: Add support for PCIe EP in AM654x Platforms")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251029080547.1253757-4-s-vadapalli@ti.com
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-stm32.c')
0 files changed, 0 insertions, 0 deletions
