[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220527065412.3677-1-hanyihao@vivo.com>
Date: Thu, 26 May 2022 23:54:12 -0700
From: Yihao Han <hanyihao@...o.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Cc: Yihao Han <hanyihao@...o.com>
Subject: [PATCH] ASoC: samsung: i2s: Check before clk_unregister() not needed
clk_unregister() already checks the clk ptr using
!clk || WARN_ON_ONCE(IS_ERR(clk)) so there is no need to check it
again before calling it.
Signed-off-by: Yihao Han <hanyihao@...o.com>
---
sound/soc/samsung/i2s.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 70c827162be4..84e21f7fc179 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1247,8 +1247,7 @@ static void i2s_unregister_clocks(struct samsung_i2s_priv *priv)
int i;
for (i = 0; i < priv->clk_data.clk_num; i++) {
- if (!IS_ERR(priv->clk_table[i]))
- clk_unregister(priv->clk_table[i]);
+ clk_unregister(priv->clk_table[i]);
}
}
--
2.17.1
Powered by blists - more mailing lists