kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()'
@ 2021-06-27 11:46 Christophe JAILLET
  2021-09-28  0:54 ` Krzysztof Wilczyński
  2021-10-22  9:35 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2021-06-27 11:46 UTC (permalink / raw)
  To: kishon, tjoseph, lorenzo.pieralisi, robh, kw, bhelgaas
  Cc: linux-omap, linux-pci, linux-arm-kernel, linux-kernel,
	kernel-janitors, Christophe JAILLET

If an error occurs after a successful 'cdns_pcie_init_phy()' call, it must
be undone by a 'cdns_pcie_disable_phy()' call, as already done above and
below.

Update the 'goto' to branch at the correct place of the error handling
path.

Fixes: 49e0efdce791 ("PCI: j721e: Add support to provide refclk to PCIe connector")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/pci/controller/cadence/pci-j721e.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
index 35e61048e133..8933db6ab1af 100644
--- a/drivers/pci/controller/cadence/pci-j721e.c
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -424,7 +424,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
 		ret = clk_prepare_enable(clk);
 		if (ret) {
 			dev_err(dev, "failed to enable pcie_refclk\n");
-			goto err_get_sync;
+			goto err_pcie_setup;
 		}
 		pcie->refclk = clk;
 
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()'
  2021-06-27 11:46 [PATCH] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()' Christophe JAILLET
@ 2021-09-28  0:54 ` Krzysztof Wilczyński
  2021-10-22  9:35 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2021-09-28  0:54 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: kishon, tjoseph, lorenzo.pieralisi, robh, bhelgaas, linux-omap,
	linux-pci, linux-arm-kernel, linux-kernel, kernel-janitors

Hi Christophe,

Thank you for sending the patch over!

Just a tiny nit-pick: there is no need to surround function names in single
quotes in the subject and in the commit message.

> If an error occurs after a successful 'cdns_pcie_init_phy()' call, it must
> be undone by a 'cdns_pcie_disable_phy()' call, as already done above and
> below.

Here, in the above sentence, you could simply mention that this is needed
for the device to be correctly powered down should there be an error, and
reference to the "above" and "below" code.

> Update the 'goto' to branch at the correct place of the error handling
> path.
> 
> Fixes: 49e0efdce791 ("PCI: j721e: Add support to provide refclk to PCIe connector")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/pci/controller/cadence/pci-j721e.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
> index 35e61048e133..8933db6ab1af 100644
> --- a/drivers/pci/controller/cadence/pci-j721e.c
> +++ b/drivers/pci/controller/cadence/pci-j721e.c
> @@ -424,7 +424,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
>  		ret = clk_prepare_enable(clk);
>  		if (ret) {
>  			dev_err(dev, "failed to enable pcie_refclk\n");
> -			goto err_get_sync;
> +			goto err_pcie_setup;
>  		}
>  		pcie->refclk = clk;

Thank you!

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

	Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()'
  2021-06-27 11:46 [PATCH] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()' Christophe JAILLET
  2021-09-28  0:54 ` Krzysztof Wilczyński
@ 2021-10-22  9:35 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2021-10-22  9:35 UTC (permalink / raw)
  To: bhelgaas, Christophe JAILLET, robh, kishon, kw, tjoseph
  Cc: Lorenzo Pieralisi, linux-kernel, kernel-janitors,
	linux-arm-kernel, linux-pci, linux-omap

On Sun, 27 Jun 2021 13:46:24 +0200, Christophe JAILLET wrote:
> If an error occurs after a successful 'cdns_pcie_init_phy()' call, it must
> be undone by a 'cdns_pcie_disable_phy()' call, as already done above and
> below.
> 
> Update the 'goto' to branch at the correct place of the error handling
> path.
> 
> [...]

Applied to pci/cadence, thanks!

[1/1] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()'
      https://git.kernel.org/lpieralisi/pci/c/1faff614aa

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-22  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27 11:46 [PATCH] PCI: j721e: Fix an error handling path in 'j721e_pcie_probe()' Christophe JAILLET
2021-09-28  0:54 ` Krzysztof Wilczyński
2021-10-22  9:35 ` Lorenzo Pieralisi

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).