linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] PCI: designware-plat: Remove redundant return value check of platform_get_resource()
@ 2016-07-28 16:14 Wei Yongjun
  2016-08-22 19:23 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-07-28 16:14 UTC (permalink / raw)
  To: Jingoo Han, Pratyush Anand, Joao Pinto, Bjorn Helgaas
  Cc: Wei Yongjun, linux-pci

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
---
 drivers/pci/host/pcie-designware-plat.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/pci/host/pcie-designware-plat.c b/drivers/pci/host/pcie-designware-plat.c
index c8079dc..17da005 100644
--- a/drivers/pci/host/pcie-designware-plat.c
+++ b/drivers/pci/host/pcie-designware-plat.c
@@ -100,9 +100,6 @@ static int dw_plat_pcie_probe(struct platform_device *pdev)
 	pp->dev = &pdev->dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	dw_plat_pcie->mem_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(dw_plat_pcie->mem_base))
 		return PTR_ERR(dw_plat_pcie->mem_base);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-22 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-28 16:14 [PATCH -next] PCI: designware-plat: Remove redundant return value check of platform_get_resource() Wei Yongjun
2016-08-22 19:23 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).