Commit 1c35cc9c authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Jakub Kicinski
Browse files

net: stmmac: remove redundant null check before clk_disable_unprepare()



Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e50fd9b5
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -788,7 +788,6 @@ static int stmmac_init_ptp(struct stmmac_priv *priv)

static void stmmac_release_ptp(struct stmmac_priv *priv)
{
	if (priv->plat->clk_ptp_ref)
	clk_disable_unprepare(priv->plat->clk_ptp_ref);
	stmmac_ptp_unregister(priv);
}
@@ -5108,7 +5107,6 @@ int stmmac_suspend(struct device *dev)
		stmmac_mac_set(priv, priv->ioaddr, false);
		pinctrl_pm_select_sleep_state(priv->device);
		/* Disable clock in case of PWM is off */
		if (priv->plat->clk_ptp_ref)
		clk_disable_unprepare(priv->plat->clk_ptp_ref);
		clk_disable_unprepare(priv->plat->pclk);
		clk_disable_unprepare(priv->plat->stmmac_clk);