lkml.org 
[lkml]   [2021]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe()
Date
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.
\
 
 \ /
  Last update: 2021-10-21 04:59    [W:0.082 / U:2.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site