diff mbox series

[v2] PCI: xgene-msi: Remove redundant dev_err call in xgene_msi_probe()

Message ID 20210408132751.1198171-1-yangerkun@huawei.com (mailing list archive)
State New
Headers show
Series [v2] PCI: xgene-msi: Remove redundant dev_err call in xgene_msi_probe() | expand

Commit Message

yangerkun April 8, 2021, 1:27 p.m. UTC
devm_ioremap_resource() internally calls __devm_ioremap_resource() which
is where error checking and handling is actually having place. So the
dev_err in xgene_msi_probe() seems redundant and remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: ErKun Yang <yangerkun@huawei.com>
---
 drivers/pci/controller/pci-xgene-msi.c | 1 -
 1 file changed, 1 deletion(-)

Comments

yangerkun April 8, 2021, 1:21 p.m. UTC | #1
+ Krzysztof Wilczyński

Sorry for missing mail-to...

在 2021/4/8 21:27, ErKun Yang 写道:
> devm_ioremap_resource() internally calls __devm_ioremap_resource() which
> is where error checking and handling is actually having place. So the
> dev_err in xgene_msi_probe() seems redundant and remove it.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
> Signed-off-by: ErKun Yang <yangerkun@huawei.com>
> ---
>   drivers/pci/controller/pci-xgene-msi.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-xgene-msi.c
> index 1c34c897a7e2..369b50f626fd 100644
> --- a/drivers/pci/controller/pci-xgene-msi.c
> +++ b/drivers/pci/controller/pci-xgene-msi.c
> @@ -451,7 +451,6 @@ static int xgene_msi_probe(struct platform_device *pdev)
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>   	xgene_msi->msi_regs = devm_ioremap_resource(&pdev->dev, res);
>   	if (IS_ERR(xgene_msi->msi_regs)) {
> -		dev_err(&pdev->dev, "no reg space\n");
>   		rc = PTR_ERR(xgene_msi->msi_regs);
>   		goto error;
>   	}
>
diff mbox series

Patch

diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-xgene-msi.c
index 1c34c897a7e2..369b50f626fd 100644
--- a/drivers/pci/controller/pci-xgene-msi.c
+++ b/drivers/pci/controller/pci-xgene-msi.c
@@ -451,7 +451,6 @@  static int xgene_msi_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	xgene_msi->msi_regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(xgene_msi->msi_regs)) {
-		dev_err(&pdev->dev, "no reg space\n");
 		rc = PTR_ERR(xgene_msi->msi_regs);
 		goto error;
 	}