[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20260126035551.1615453-1-nichen@iscas.ac.cn>
Date: Mon, 26 Jan 2026 11:55:51 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: vkoul@...nel.org,
neil.armstrong@...aro.org
Cc: linux-phy@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] phy: marvell: phy-mvebu-cp110-comphy: Remove unnecessary NULL check before clk_disable_unprepare()
clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL.
Remove unneeded NULL check for clk here.
Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
index 71f9c14fb50d..990c0dd94ad6 100644
--- a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
+++ b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
@@ -984,14 +984,11 @@ static int mvebu_comphy_init_clks(struct mvebu_comphy_priv *priv)
static void mvebu_comphy_disable_unprepare_clks(struct mvebu_comphy_priv *priv)
{
- if (priv->axi_clk)
- clk_disable_unprepare(priv->axi_clk);
+ clk_disable_unprepare(priv->axi_clk);
- if (priv->mg_core_clk)
- clk_disable_unprepare(priv->mg_core_clk);
+ clk_disable_unprepare(priv->mg_core_clk);
- if (priv->mg_domain_clk)
- clk_disable_unprepare(priv->mg_domain_clk);
+ clk_disable_unprepare(priv->mg_domain_clk);
}
static int mvebu_comphy_probe(struct platform_device *pdev)
--
2.25.1
Powered by blists - more mailing lists