From: Bjorn Helgaas <helgaas@kernel.org>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Linus Walleij <linus.walleij@linaro.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Marc Gonzalez <marc_gonzalez@sigmadesigns.com>,
Brian Norris <briannorris@chromium.org>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH -next] PCI: faraday: Fix wrong pointer passed to PTR_ERR()
Date: Fri, 20 Oct 2017 18:03:28 -0500 [thread overview]
Message-ID: <20171020230328.GX6332@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <1508242263-73684-1-git-send-email-weiyongjun1@huawei.com>
On Tue, Oct 17, 2017 at 12:11:03PM +0000, Wei Yongjun wrote:
> PTR_ERR should access the value just tested by IS_ERR, otherwise
> the wrong error code will be returned.
>
> Fixes: 2eeb02b28579 ("PCI: faraday: Add clock handling")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied with Linus' reviewed-by to pci/host-faraday for v4.15, thanks!
> ---
> drivers/pci/host/pci-ftpci100.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c
> index 06d9687..fae6bd1 100644
> --- a/drivers/pci/host/pci-ftpci100.c
> +++ b/drivers/pci/host/pci-ftpci100.c
> @@ -463,7 +463,7 @@ static int faraday_pci_probe(struct platform_device *pdev)
> }
> p->bus_clk = devm_clk_get(dev, "PCICLK");
> if (IS_ERR(p->bus_clk))
> - return PTR_ERR(clk);
> + return PTR_ERR(p->bus_clk);
> ret = clk_prepare_enable(p->bus_clk);
> if (ret) {
> dev_err(dev, "could not prepare PCICLK\n");
>
prev parent reply other threads:[~2017-10-20 23:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 12:11 [PATCH -next] PCI: faraday: Fix wrong pointer passed to PTR_ERR() Wei Yongjun
2017-10-17 16:22 ` Linus Walleij
2017-10-20 23:03 ` Bjorn Helgaas [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=20171020230328.GX6332@bhelgaas-glaptop.roam.corp.google.com \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=briannorris@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc_gonzalez@sigmadesigns.com \
--cc=sergei.shtylyov@cogentembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.