summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2023-01-12 22:56:12 +0300
committerSerge Semin <fancer.lancer@gmail.com>2026-08-06 01:01:48 +0300
commit5758caa0ec48cc2a9b3c7a8d64999ba989c5de90 (patch)
tree66eeb91317b0e5696df0ccadf47008f7cc15d10f
parent4555b854c9c23b1bd0774a82fcb3ae0af0927862 (diff)
downloadlinux-5758caa0ec48cc2a9b3c7a8d64999ba989c5de90.tar.gz
linux-5758caa0ec48cc2a9b3c7a8d64999ba989c5de90.zip
PCI: bt1: Fix printing false error message
The dev_err_probe() method is supposed to be invoked only if any error is happened. It was definitely wrong to call it unconditionally. Due to that the DWC PCIe host initialization error-message is printed all the time the Baikal-T1 PCIe controller is probed even if no error actually happened. Fixes: ba6ed462dcf4 ("PCI: dwc: Add Baikal-T1 PCIe controller support") Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-rw-r--r--drivers/pci/controller/dwc/pcie-bt1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pcie-bt1.c b/drivers/pci/controller/dwc/pcie-bt1.c
index 1340edc18d12..b2fc7eea4bdf 100644
--- a/drivers/pci/controller/dwc/pcie-bt1.c
+++ b/drivers/pci/controller/dwc/pcie-bt1.c
@@ -597,8 +597,10 @@ static int bt1_pcie_add_port(struct bt1_pcie *btpci)
dw_pcie_cap_set(&btpci->dw, REQ_RES);
ret = dw_pcie_host_init(&btpci->dw.pp);
+ if (ret)
+ dev_err_probe(dev, ret, "Failed to initialize DWC PCIe host\n");
- return dev_err_probe(dev, ret, "Failed to initialize DWC PCIe host\n");
+ return ret;
}
static void bt1_pcie_del_port(struct bt1_pcie *btpci)