[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240911143154.59816-1-qianqiang.liu@163.com>
Date: Wed, 11 Sep 2024 22:31:55 +0800
From: Qianqiang Liu <qianqiang.liu@....com>
To: ryder.lee@...iatek.com,
jianjun.wang@...iatek.com,
lpieralisi@...nel.org,
matthias.bgg@...il.com
Cc: linux-pci@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Qianqiang Liu <qianqiang.liu@....com>
Subject: [PATCH] PCI: mediatek-gen3: Check the return value of the reset_control_bulk_deassert
"reset_control_bulk_deassert" may return error code, we should check the
return value of it.
Signed-off-by: Qianqiang Liu <qianqiang.liu@....com>
---
drivers/pci/controller/pcie-mediatek-gen3.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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.
--
2.39.2
Powered by blists - more mailing lists