From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Niklas Cassel <niklas.cassel@axis.com>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-arm-kernel@axis.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH -next] PCI: dwc: artpec6: Fix return value check in artpec6_add_pcie_ep()
Date: Wed, 3 Jan 2018 11:43:42 +0000 [thread overview]
Message-ID: <20180103114342.GB26554@red-moon> (raw)
In-Reply-To: <1514964815-93190-1-git-send-email-weiyongjun1@huawei.com>
On Wed, Jan 03, 2018 at 07:33:35AM +0000, Wei Yongjun wrote:
> In case of error, the function devm_ioremap() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
>
> Fixes: b5074ef6fe7d ("PCI: dwc: artpec6: Add support for endpoint mode")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/pci/dwc/pcie-artpec6.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to pci/dwc for v4.16, thanks.
Lorenzo
> diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c
> index 312f21b..b1e9820 100644
> --- a/drivers/pci/dwc/pcie-artpec6.c
> +++ b/drivers/pci/dwc/pcie-artpec6.c
> @@ -485,8 +485,8 @@ static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie,
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2");
> pci->dbi_base2 = devm_ioremap(dev, res->start, resource_size(res));
> - if (IS_ERR(pci->dbi_base2))
> - return PTR_ERR(pci->dbi_base2);
> + if (!pci->dbi_base2)
> + return -ENOMEM;
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space");
> if (!res)
>
next prev parent reply other threads:[~2018-01-03 11:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 7:33 [PATCH -next] PCI: dwc: artpec6: Fix return value check in artpec6_add_pcie_ep() Wei Yongjun
2018-01-03 11:43 ` Lorenzo Pieralisi [this message]
2018-01-09 15:21 ` Niklas Cassel
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=20180103114342.GB26554@red-moon \
--to=lorenzo.pieralisi@arm.com \
--cc=bhelgaas@google.com \
--cc=jesper.nilsson@axis.com \
--cc=linux-arm-kernel@axis.com \
--cc=linux-pci@vger.kernel.org \
--cc=niklas.cassel@axis.com \
--cc=weiyongjun1@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).