diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-07-20 10:01:58 -0500 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2018-09-18 11:44:39 +0100 |
commit | 17a0a1e5f6c4bd6df17834312ff577c1373d87b8 (patch) | |
tree | d59660fc583e37dd57e3b5ed6ed62db5fe0e5d90 /drivers/pci | |
parent | 7876320f88802b22d4e2daf7eb027dd14175a0f8 (diff) | |
download | blackbird-op-linux-17a0a1e5f6c4bd6df17834312ff577c1373d87b8.tar.gz blackbird-op-linux-17a0a1e5f6c4bd6df17834312ff577c1373d87b8.zip |
PCI: mediatek: Fix unchecked return value
Check return value of devm_pci_remap_iospace().
Addresses-Coverity-ID: 1471965 ("Unchecked return value")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Honghui Zhang <honghui.zhang@mediatek.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/controller/pcie-mediatek.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c index 861dda69f366..1477939ef38a 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; } |