* [PATCH] PCI: cadence: add missing return for plat probe
@ 2021-10-20 11:17 Li Chen
2021-10-20 19:12 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Li Chen @ 2021-10-20 11:17 UTC (permalink / raw)
To: Tom Joseph, Lorenzo Pieralisi, Rob Herring, kw@linux.com,
Bjorn Helgaas, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Otherwise, the code will continue to error handle,
which is not excepted.
Signed-off-by: Li Chen <lchen@ambarella.com>
Signed-off-by: Xuliang Zhang <xlzhanga@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] 2+ messages in thread
* Re: [PATCH] PCI: cadence: add missing return for plat probe
2021-10-20 11:17 [PATCH] PCI: cadence: add missing return for plat probe Li Chen
@ 2021-10-20 19:12 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2021-10-20 19:12 UTC (permalink / raw)
To: Li Chen
Cc: Tom Joseph, Lorenzo Pieralisi, Rob Herring, kw@linux.com,
Bjorn Helgaas, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
On Wed, Oct 20, 2021 at 11:17:51AM +0000, Li Chen wrote:
> Otherwise, the code will continue to error handle,
> which is not excepted.
In subject and commit log:
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.
We should have a Fixes: tag here to show where this bug was
introduced. Look at previous git history to see the format. Maybe
also a stable tag so this will get backported to stable kernels.
Interesting that nobody noticed such an obvious bug until now.
> Signed-off-by: Li Chen <lchen@ambarella.com>
> Signed-off-by: Xuliang Zhang <xlzhanga@ambarella.com>
Since the patch was sent by Li, that signoff should be last, per
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=v5.14#n365
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Thanks for the patch!
> ---
> 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] 2+ messages in thread
end of thread, other threads:[~2021-10-20 19:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-20 11:17 [PATCH] PCI: cadence: add missing return for plat probe Li Chen
2021-10-20 19:12 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox