From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Honghui Zhang <honghui.zhang@mediatek.com>,
Sasha Levin <sashal@kernel.org>,
linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: [PATCH AUTOSEL 4.19 008/191] PCI: mediatek: Fix unchecked return value
Date: Sat, 9 Nov 2019 21:37:10 -0500 [thread overview]
Message-ID: <20191110024013.29782-8-sashal@kernel.org> (raw)
In-Reply-To: <20191110024013.29782-1-sashal@kernel.org>
From: "Gustavo A. R. Silva" <gustavo@embeddedor.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@embeddedor.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Honghui Zhang <honghui.zhang@mediatek.com>
Signed-off-by: Sasha Levin <sashal@kernel.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
next prev parent reply other threads:[~2019-11-10 3:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191110024013.29782-1-sashal@kernel.org>
2019-11-10 2:37 ` [PATCH AUTOSEL 4.19 006/191] PCI/ACPI: Correct error message for ASPM disabling Sasha Levin
2019-11-10 2:37 ` Sasha Levin [this message]
2019-11-10 2:38 ` [PATCH AUTOSEL 4.19 061/191] PCI: portdrv: Initialize service drivers directly Sasha Levin
2019-11-10 2:38 ` [PATCH AUTOSEL 4.19 079/191] PCI/AER: Take reference on error devices Sasha Levin
2019-11-10 2:38 ` [PATCH AUTOSEL 4.19 080/191] PCI/AER: Don't read upstream ports below fatal errors Sasha Levin
2019-11-10 2:38 ` [PATCH AUTOSEL 4.19 081/191] PCI/ERR: Use slot reset if available Sasha Levin
2019-11-10 2:39 ` [PATCH AUTOSEL 4.19 145/191] PCI/ERR: Run error recovery callbacks for all affected devices Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191110024013.29782-8-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=gustavo@embeddedor.com \
--cc=honghui.zhang@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).