All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: mediatek: Fix unchecked return value
@ 2018-07-20 15:01 Gustavo A. R. Silva
  2018-09-05  8:50   ` Honghui Zhang
  2018-09-18 10:46 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-20 15:01 UTC (permalink / raw)
  To: Ryder Lee, Lorenzo Pieralisi, Bjorn Helgaas
  Cc: linux-pci, linux-mediatek, linux-kernel, Gustavo A. R. Silva

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@embeddedor.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


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

end of thread, other threads:[~2018-09-18 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 15:01 [PATCH] PCI: mediatek: Fix unchecked return value Gustavo A. R. Silva
2018-09-05  8:50 ` Honghui Zhang
2018-09-05  8:50   ` Honghui Zhang
2018-09-18 10:46 ` Lorenzo Pieralisi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.