From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: mediatek: Fix unchecked return value
Date: Tue, 18 Sep 2018 11:46:29 +0100 [thread overview]
Message-ID: <20180918104629.GC26886@e107981-ln.cambridge.arm.com> (raw)
In-Reply-To: <20180720150158.GA10922@embeddedor.com>
On Fri, Jul 20, 2018 at 10:01:58AM -0500, Gustavo A. R. Silva wrote:
> 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(-)
Applied to pci/mediatek for v4.20, thanks.
Lorenzo
> 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
>
prev parent reply other threads:[~2018-09-18 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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-18 10:46 ` Lorenzo Pieralisi [this message]
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=20180918104629.GC26886@e107981-ln.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=bhelgaas@google.com \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=ryder.lee@mediatek.com \
/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).