Skip to content

Commit da30e8b

Browse files
Dejin ZhengLorenzo Pieralisi
authored andcommitted
PCI: controller: Remove duplicate error message
devm_pci_remap_cfg_resource() will print an error message by itself when goes wrong, so remove the duplicate error message. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dejin Zheng <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Rob Herring <[email protected]>
1 parent 3cf0eea commit da30e8b

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,8 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc)
225225

226226
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg");
227227
rc->cfg_base = devm_pci_remap_cfg_resource(dev, res);
228-
if (IS_ERR(rc->cfg_base)) {
229-
dev_err(dev, "missing \"cfg\"\n");
228+
if (IS_ERR(rc->cfg_base))
230229
return PTR_ERR(rc->cfg_base);
231-
}
232230
rc->cfg_res = res;
233231

234232
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mem");

drivers/pci/controller/dwc/pcie-al.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,8 @@ static int al_pcie_init(struct pci_config_window *cfg)
6767
dev_dbg(dev, "Root port dbi res: %pR\n", res);
6868

6969
al_pcie->dbi_base = devm_pci_remap_cfg_resource(dev, res);
70-
if (IS_ERR(al_pcie->dbi_base)) {
71-
long err = PTR_ERR(al_pcie->dbi_base);
72-
73-
dev_err(dev, "couldn't remap dbi base %pR (err:%ld)\n",
74-
res, err);
75-
return err;
76-
}
70+
if (IS_ERR(al_pcie->dbi_base))
71+
return PTR_ERR(al_pcie->dbi_base);
7772

7873
cfg->priv = al_pcie;
7974

@@ -408,10 +403,8 @@ static int al_pcie_probe(struct platform_device *pdev)
408403

409404
dbi_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi");
410405
pci->dbi_base = devm_pci_remap_cfg_resource(dev, dbi_res);
411-
if (IS_ERR(pci->dbi_base)) {
412-
dev_err(dev, "couldn't remap dbi base %pR\n", dbi_res);
406+
if (IS_ERR(pci->dbi_base))
413407
return PTR_ERR(pci->dbi_base);
414-
}
415408

416409
ecam_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "config");
417410
if (!ecam_res) {

drivers/pci/controller/dwc/pcie-armada8k.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ static int armada8k_pcie_probe(struct platform_device *pdev)
317317
base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
318318
pci->dbi_base = devm_pci_remap_cfg_resource(dev, base);
319319
if (IS_ERR(pci->dbi_base)) {
320-
dev_err(dev, "couldn't remap regs base %p\n", base);
321320
ret = PTR_ERR(pci->dbi_base);
322321
goto fail_clkreg;
323322
}

drivers/pci/controller/dwc/pcie-spear13xx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ static int spear13xx_pcie_probe(struct platform_device *pdev)
273273
dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi");
274274
pci->dbi_base = devm_pci_remap_cfg_resource(dev, dbi_base);
275275
if (IS_ERR(pci->dbi_base)) {
276-
dev_err(dev, "couldn't remap dbi base %p\n", dbi_base);
277276
ret = PTR_ERR(pci->dbi_base);
278277
goto fail_clk;
279278
}

0 commit comments

Comments
 (0)