diff mbox series

PCI: mediatek-gen3: Check the return value of the reset_control_bulk_deassert

Message ID 20240911143154.59816-1-qianqiang.liu@163.com (mailing list archive)
State New
Headers show
Series PCI: mediatek-gen3: Check the return value of the reset_control_bulk_deassert | expand

Commit Message

Qianqiang Liu Sept. 11, 2024, 2:31 p.m. UTC
"reset_control_bulk_deassert" may return error code, we should check the
return value of it.

Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com>
---
 drivers/pci/controller/pcie-mediatek-gen3.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index 66ce4b5d309b..5b35dc32ad47 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -1016,7 +1016,9 @@  static int mtk_pcie_setup(struct mtk_gen3_pcie *pcie)
 	 * Deassert the line in order to avoid unbalance in deassert_count
 	 * counter since the bulk is shared.
 	 */
-	reset_control_bulk_deassert(pcie->soc->phy_resets.num_resets, pcie->phy_resets);
+	err = reset_control_bulk_deassert(pcie->soc->phy_resets.num_resets, pcie->phy_resets);
+	if (err)
+		return err;
 	/*
 	 * The controller may have been left out of reset by the bootloader
 	 * so make sure that we get a clean start by asserting resets here.