Skip to content

Commit 882569d

Browse files
Xichao ZhaoMani-Sadhasivam
authored andcommitted
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: Xichao Zhao <[email protected]> [mani: reworded the subject] Signed-off-by: Manivannan Sadhasivam <[email protected]>
1 parent 8f5ae30 commit 882569d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pci/controller/plda/pcie-plda-host.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,7 @@ int plda_pcie_host_init(struct plda_pcie_rp *port, struct pci_ops *ops,
599599

600600
bridge = devm_pci_alloc_host_bridge(dev, 0);
601601
if (!bridge)
602-
return dev_err_probe(dev, -ENOMEM,
603-
"failed to alloc bridge\n");
602+
return -ENOMEM;
604603

605604
if (port->host_ops && port->host_ops->host_init) {
606605
ret = port->host_ops->host_init(port);

0 commit comments

Comments
 (0)