[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250820085200.395578-1-zhao.xichao@vivo.com>
Date: Wed, 20 Aug 2025 16:52:00 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: daire.mcnamara@...rochip.com,
lpieralisi@...nel.org,
kwilczynski@...nel.org,
mani@...nel.org,
bhelgaas@...gle.com
Cc: robh@...nel.org,
linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] PCI: plda: Remove the use of dev_err_probe()
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
---
drivers/pci/controller/plda/pcie-plda-host.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/controller/plda/pcie-plda-host.c b/drivers/pci/controller/plda/pcie-plda-host.c
index 8e2db2e5b64b..3c2f68383010 100644
--- a/drivers/pci/controller/plda/pcie-plda-host.c
+++ b/drivers/pci/controller/plda/pcie-plda-host.c
@@ -599,8 +599,7 @@ int plda_pcie_host_init(struct plda_pcie_rp *port, struct pci_ops *ops,
bridge = devm_pci_alloc_host_bridge(dev, 0);
if (!bridge)
- return dev_err_probe(dev, -ENOMEM,
- "failed to alloc bridge\n");
+ return -ENOMEM;
if (port->host_ops && port->host_ops->host_init) {
ret = port->host_ops->host_init(port);
--
2.34.1
Powered by blists - more mailing lists