From: Bjorn Helgaas <helgaas@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Simon Horman <horms@verge.net.au>,
Phil Edworthy <phil.edworthy@renesas.com>,
linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] PCI: rcar: Don't disable/unprepare clocks on prepare/enable failure
Date: Mon, 12 Sep 2016 17:15:47 -0500 [thread overview]
Message-ID: <20160912221547.GJ23532@localhost> (raw)
In-Reply-To: <1472635702-26465-1-git-send-email-geert+renesas@glider.be>
On Wed, Aug 31, 2016 at 11:28:22AM +0200, Geert Uytterhoeven wrote:
> If clk_prepare_enable() fails, we must not call clk_disable_unprepare()
> in the error path.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied to pci/host-rcar for v4.9, thanks!
> ---
> drivers/pci/host/pcie-rcar.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> index 65db7a2215090ff4..0f5c2b2b4f8dfcd2 100644
> --- a/drivers/pci/host/pcie-rcar.c
> +++ b/drivers/pci/host/pcie-rcar.c
> @@ -782,7 +782,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
> }
> err = clk_prepare_enable(pcie->clk);
> if (err)
> - goto fail_clk;
> + return err;
>
> pcie->bus_clk = devm_clk_get(&pdev->dev, "pcie_bus");
> if (IS_ERR(pcie->bus_clk)) {
> @@ -792,7 +792,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
> }
> err = clk_prepare_enable(pcie->bus_clk);
> if (err)
> - goto err_map_reg;
> + goto fail_clk;
>
> i = irq_of_parse_and_map(pdev->dev.of_node, 0);
> if (!i) {
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-09-12 22:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-31 9:28 [PATCH] PCI: rcar: Don't disable/unprepare clocks on prepare/enable failure Geert Uytterhoeven
2016-09-12 22:15 ` 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=20160912221547.GJ23532@localhost \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=horms@verge.net.au \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=phil.edworthy@renesas.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).