[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191119051414.700418537@linuxfoundation.org>
Date: Tue, 19 Nov 2019 06:17:19 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Honghui Zhang <honghui.zhang@...iatek.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.19 242/422] PCI: mediatek: Fix unchecked return value
From: Gustavo A. R. Silva <gustavo@...eddedor.com>
[ Upstream commit 17a0a1e5f6c4bd6df17834312ff577c1373d87b8 ]
Check return value of devm_pci_remap_iospace().
Addresses-Coverity-ID: 1471965 ("Unchecked return value")
Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Acked-by: Honghui Zhang <honghui.zhang@...iatek.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
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 c5ff6ca65eab2..0d100f56cb884 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -1120,7 +1120,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.20.1
Powered by blists - more mailing lists