From patchwork Wed Sep 11 14:31:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qianqiang Liu X-Patchwork-Id: 13800671 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.3]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5362C191F8C; Wed, 11 Sep 2024 14:33:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.3 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726065190; cv=none; b=JSF+b7uXa64aXtPt/GZ4hx7awqnE1qfJlIq61AbtOlmnvW9TWikYlQi5rmT01CYkUU/xrHjJc844JXS9vNgMxHOLvfG0CKSdOCCkMBf7GdYq7X4y5yiU9ophsDHOOlw/aB3SNVFWHSGKVsdGdp2H0gBR59Ae82Gmj+oI32P1nsI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726065190; c=relaxed/simple; bh=nH7uXR/mf89HIjvFTdMKPGL8LxZGyXArM3vFfrHZHHk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=qAHV0LJ/Yhauqt3if+S74alpiTQleUMwteCnYh5pEZBVP90PBajtDv0iq238xXlXcrl3oyaGys4Z3u9d5BYP+uxB2omA2e4K0hTXGc5amHeR/ZVNGTWSv/Zj5o5pBSzik7VIDetyqvixodyTqHhIj4NVxk/TxpnjEIyTLOF7X38= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=NDmOFM2K; arc=none smtp.client-ip=117.135.210.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="NDmOFM2K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=BeDJb itMR/rHgNLbtzCICYHaqbwBV6Q3Kpd+79Ocnh0=; b=NDmOFM2KsaKH9f366mVWW Sf13O3yxeAZTUlhdT1SOVEX4yX7fg5LBaWLARqMF5h1wN/Y57C520cxygDwoJRep +GEUdatOmFgswFdsdkZRQ1BYL7EiWb46IpdEpuwG7ZDHX43uFQM8pzzJ+iB9OIkQ dep6uYMrgDJ61wH1yb/iQc= Received: from iZbp1asjb3cy8ks0srf007Z.. (unknown [120.26.85.94]) by gzga-smtp-mta-g3-1 (Coremail) with SMTP id _____wDnT_r1qeFmmhDyCg--.6633S2; Wed, 11 Sep 2024 22:32:21 +0800 (CST) From: Qianqiang Liu To: ryder.lee@mediatek.com, jianjun.wang@mediatek.com, lpieralisi@kernel.org, matthias.bgg@gmail.com Cc: linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Qianqiang Liu Subject: [PATCH] PCI: mediatek-gen3: Check the return value of the reset_control_bulk_deassert Date: Wed, 11 Sep 2024 22:31:55 +0800 Message-Id: <20240911143154.59816-1-qianqiang.liu@163.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: _____wDnT_r1qeFmmhDyCg--.6633S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKr4xJr43Gr4kAry5tr4ktFb_yoWkJFg_Xr Z7GFsrA3yDCry3KwnFyrWrArZxAas7Z3W0kF95tF13Aa48ur1FqrnrZrWDZF4UGF4Yqr9x GF1kuw4fAa4UJjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUjJPEDUUUUU== X-CM-SenderInfo: xtld01pldqwhxolxqiywtou0bp/1tbiLwVXamVOGRDjgwACsX "reset_control_bulk_deassert" may return error code, we should check the return value of it. Signed-off-by: Qianqiang Liu --- 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.