[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180720150158.GA10922@embeddedor.com>
Date: Fri, 20 Jul 2018 10:01:58 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Ryder Lee <ryder.lee@...iatek.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>
Cc: linux-pci@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: [PATCH] PCI: mediatek: Fix unchecked return value
Check return value of devm_pci_remap_iospace.
Notice that, currently, all instances of devm_pci_remap_iospace
are being checked.
Addresses-Coverity-ID: 1471965 ("Unchecked return value")
Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
---
drivers/pci/controller/pcie-mediatek.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 861dda6..1477939 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -1109,7 +1109,9 @@ static int mtk_pcie_request_resources(struct mtk_pcie *pcie)
if (err < 0)
return err;
- devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
+ err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
+ if (err)
+ return err;
return 0;
}
--
2.7.4
Powered by blists - more mailing lists