linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe()
@ 2021-10-21  2:50 Li Chen
  2021-10-21 10:18 ` Tom Joseph
  2021-11-03 18:51 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Li Chen @ 2021-10-21  2:50 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Tom Joseph, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	linux-pci, linux-kernel

When cdns_plat_pcie_probe() succeeds, return success instead of
falling into the error handling code.

Signed-off-by: Xuliang Zhang <xlzhanga@ambarella.com>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Fixes: bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library")
Cc: stable@vger.kernel.org
Signed-off-by: Li Chen <lchen@ambarella.com>
---
 drivers/pci/controller/cadence/pcie-cadence-plat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/cadence/pcie-cadence-plat.c b/drivers/pci/controller/cadence/pcie-cadence-plat.c
index 5fee0f89ab59..a224afadbcc0 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-plat.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-plat.c
@@ -127,6 +127,8 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev)
 			goto err_init;
 	}
 
+	return 0;
+
  err_init:
  err_get_sync:
 	pm_runtime_put_sync(dev);
-- 
2.33.0

**********************************************************************
This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

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

* RE: [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe()
  2021-10-21  2:50 [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe() Li Chen
@ 2021-10-21 10:18 ` Tom Joseph
  2021-11-03 18:51 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Joseph @ 2021-10-21 10:18 UTC (permalink / raw)
  To: Li Chen, Bjorn Helgaas
  Cc: Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas, linux-pci,
	linux-kernel

Hi Li,

 Thanks a lot for the patch!!

> -----Original Message-----
> From: Li Chen <lchen@ambarella.com>
> Sent: 21 October 2021 03:50
> Subject: [PATCH v2] PCI: cadence: Add missing return in
> cdns_plat_pcie_probe()
> 
> When cdns_plat_pcie_probe() succeeds, return success instead of
> falling into the error handling code.
> 
> Signed-off-by: Xuliang Zhang <xlzhanga@ambarella.com>
> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
> Fixes: bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library")
> Cc: stable@vger.kernel.org
> Signed-off-by: Li Chen <lchen@ambarella.com>
> ---
>  drivers/pci/controller/cadence/pcie-cadence-plat.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
Acked-by: Tom Joseph <tjoseph@cadence.com>

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

* Re: [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe()
  2021-10-21  2:50 [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe() Li Chen
  2021-10-21 10:18 ` Tom Joseph
@ 2021-11-03 18:51 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2021-11-03 18:51 UTC (permalink / raw)
  To: Li Chen
  Cc: Tom Joseph, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	linux-pci, linux-kernel

On Thu, Oct 21, 2021 at 02:50:19AM +0000, Li Chen wrote:
> When cdns_plat_pcie_probe() succeeds, return success instead of
> falling into the error handling code.
> 
> Signed-off-by: Xuliang Zhang <xlzhanga@ambarella.com>
> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
> Fixes: bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library")
> Cc: stable@vger.kernel.org
> Signed-off-by: Li Chen <lchen@ambarella.com>

This would ordinarily go via Lorenzo's tree, but I picked it up so it
would make v5.16.

> ---
>  drivers/pci/controller/cadence/pcie-cadence-plat.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/controller/cadence/pcie-cadence-plat.c b/drivers/pci/controller/cadence/pcie-cadence-plat.c
> index 5fee0f89ab59..a224afadbcc0 100644
> --- a/drivers/pci/controller/cadence/pcie-cadence-plat.c
> +++ b/drivers/pci/controller/cadence/pcie-cadence-plat.c
> @@ -127,6 +127,8 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev)
>  			goto err_init;
>  	}
>  
> +	return 0;
> +
>   err_init:
>   err_get_sync:
>  	pm_runtime_put_sync(dev);
> -- 
> 2.33.0
> 
> **********************************************************************
> This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

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

end of thread, other threads:[~2021-11-03 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21  2:50 [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe() Li Chen
2021-10-21 10:18 ` Tom Joseph
2021-11-03 18:51 ` Bjorn Helgaas

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