[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117145636.0267b2f1@xhacker.debian>
Date: Tue, 17 Nov 2020 14:56:36 +0800
From: Jisheng Zhang <Jisheng.Zhang@...aptics.com>
To: Wang Hai <wanghai38@...wei.com>
Cc: <jingoohan1@...il.com>, <gustavo.pimentel@...opsys.com>,
<lorenzo.pieralisi@....com>, <robh@...nel.org>,
<bhelgaas@...gle.com>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] PCI: dwc: fix error return code in
dw_pcie_host_init()
On Tue, 17 Nov 2020 14:41:42 +0800 Wang Hai <wanghai38@...wei.com> wrote:
>
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wang Hai <wanghai38@...wei.com>
Reviewed-by Jisheng Zhang <Jisheng.Zhang@...aptics.com>
> ---
> v1->v2: just add 'ret = xxx'
> drivers/pci/controller/dwc/pcie-designware-host.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 44c2a6572199..42d8116a4a00 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -392,7 +392,8 @@ int dw_pcie_host_init(struct pcie_port *pp)
> sizeof(pp->msi_msg),
> DMA_FROM_DEVICE,
> DMA_ATTR_SKIP_CPU_SYNC);
> - if (dma_mapping_error(pci->dev, pp->msi_data)) {
> + ret = dma_mapping_error(pci->dev, pp->msi_data);
> + if (ret) {
> dev_err(pci->dev, "Failed to map MSI data\n");
> pp->msi_data = 0;
> goto err_free_msi;
> --
> 2.17.1
>
Powered by blists - more mailing lists