From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
To: Wang Hai <wanghai38@huawei.com>
Cc: <jingoohan1@gmail.com>, <gustavo.pimentel@synopsys.com>,
<lorenzo.pieralisi@arm.com>, <robh@kernel.org>,
<bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: dwc: fix error return code in dw_pcie_host_init()
Date: Tue, 17 Nov 2020 09:49:06 +0800 [thread overview]
Message-ID: <20201117094906.6e196cac@xhacker.debian> (raw)
In-Reply-To: <20201116135023.57321-1-wanghai38@huawei.com>
On Mon, 16 Nov 2020 21:50:23 +0800 Wang Hai wrote:
>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
good catch.
>
> Fixes: 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
> ---
> drivers/pci/controller/dwc/pcie-designware-host.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 44c2a6572199..7b3c91c6ae02 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -395,6 +395,7 @@ int dw_pcie_host_init(struct pcie_port *pp)
> if (dma_mapping_error(pci->dev, pp->msi_data)) {
> dev_err(pci->dev, "Failed to map MSI data\n");
> pp->msi_data = 0;
> + ret = -ENOMEM;
what about use the return value of dma_maping_error()? I.E
ret = dma_mapping_error()
if (ret) {
....
}
> goto err_free_msi;
> }
> } else {
> --
> 2.17.1
>
next prev parent reply other threads:[~2020-11-17 1:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 13:50 [PATCH] PCI: dwc: fix error return code in dw_pcie_host_init() Wang Hai
2020-11-17 1:49 ` Jisheng Zhang [this message]
2020-11-17 6:54 ` wanghai (M)
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=20201117094906.6e196cac@xhacker.debian \
--to=jisheng.zhang@synaptics.com \
--cc=bhelgaas@google.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=robh@kernel.org \
--cc=wanghai38@huawei.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).