PCI: xgene: Fix the error return code
PATCH 1/1 PCI: xgene: Fix the error return code
In the case of IS_ERR() error, we should return PTR_ERR().
Fix the error return code.
--- drivers/pci/host/pci-xgene-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/pci-xgene-msi.c +1 -1
@@ -465,7 +465,7 @@ static int xgene_msi_probe(struct platform_device *pdev) 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 = -EINVAL ; + rc =PTR_ERR (xgene_msi->msi_regs); goto error; } xgene_msi->msi_addr = res->start;
Signature · 1 line
2.7.4
[+ Khuong Dinh]
Quoted 8 lines · Fabio Estevam
In the case of
IS_ERR()error, we should returnPTR_ERR().Fix the error return code.
Signed-off-by Fabio Estevam <[email protected]>--- drivers/pci/host/pci-xgene-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I am about to apply this patch, please let me know if you see any issue with that.
Thanks,
Lorenzo
Quoted 16 lines
drivers/pci/host/pci-xgene-msi.c +1
-1@@ -465,7 +465,7 @@ static int xgene_msi_probe(struct platform_device *pdev) 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 = -EINVAL ; + rc =PTR_ERR (xgene_msi->msi_regs); goto error; } xgene_msi->msi_addr = res->start;Signature · 1 line
2.7.4
Khuong Dinh, Lorenzo,
Quoted 7 lines · Lorenzo Pieralisi
[+ Khuong Dinh]
Quoted 4 lines · Fabio Estevam
In the case of
IS_ERR()error, we should returnPTR_ERR().Fix the error return code.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Fabio Estevam <[email protected]>--- drivers/pci/host/pci-xgene-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)I am about to apply this patch, please let me know if you see any issue with that.
A gente ping.
Quoted 20 lines
Thanks,
LorenzoQuoted 16 lines
drivers/pci/host/pci-xgene-msi.c +1
-2@@ -465,7 +465,7 @@ static int xgene_msi_probe(struct platform_device *pdev) 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 = -EINVAL ; + rc =PTR_ERR (xgene_msi->msi_regs); goto error; } xgene_msi->msi_addr = res->start; --2.7.4
Lorenzo Pieralisi
AppliedQuoted 16 lines · Fabio Estevam
Khuong Dinh, Lorenzo,
Quoted 12 lines · Lorenzo Pieralisi
[+ Khuong Dinh]
Quoted 8 lines · Fabio Estevam
In the case of
IS_ERR()error, we should returnPTR_ERR().Fix the error return code.
Signed-off-by Fabio Estevam <[email protected]>--- drivers/pci/host/pci-xgene-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Quoted 2 lines
I am about to apply this patch, please let me know if you see any issue with that.
A gente ping.
Applied to pci/xgene for v4.17, sorry for the delay.
Lorenzo
Quoted 19 lines
Quoted 19 lines
Thanks,
LorenzoQuoted 16 lines
drivers/pci/host/pci-xgene-msi.c +1
-2@@ -465,7 +465,7 @@ static int xgene_msi_probe(struct platform_device *pdev) 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 = -EINVAL ; + rc =PTR_ERR (xgene_msi->msi_regs); goto error; } xgene_msi->msi_addr = res->start; --2.7.4