Commit 882569dc authored by Xichao Zhao's avatar Xichao Zhao Committed by Manivannan Sadhasivam
Browse files

PCI: plda: Remove dev_err_probe() when the errno is -ENOMEM



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: default avatarXichao Zhao <zhao.xichao@vivo.com>
[mani: reworded the subject]
Signed-off-by: default avatarManivannan Sadhasivam <mani@kernel.org>
parent 8f5ae30d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);