[PATCH 1/2] ASoC: renesas: adg: Drop redundant NULL check on clk_get and clk_register_fixed_rate
From: Krzysztof Kozlowski
Date: Sun Jul 05 2026 - 13:23:42 EST
devm_clk_get() and clk_register_fixed_rate() do not return NULL (only
valid clock or ERR pointer), so simplify the code to drop redundant
IS_ERR_OR_NULL().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
---
sound/soc/renesas/rcar/adg.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/renesas/rcar/adg.c b/sound/soc/renesas/rcar/adg.c
index 53efd1be5139..2a74d89ba39d 100644
--- a/sound/soc/renesas/rcar/adg.c
+++ b/sound/soc/renesas/rcar/adg.c
@@ -565,7 +565,7 @@ static struct clk *rsnd_adg_create_null_clk(struct rsnd_priv *priv,
struct clk *clk;
clk = clk_register_fixed_rate(dev, name, parent, 0, 0);
- if (IS_ERR_OR_NULL(clk)) {
+ if (IS_ERR(clk)) {
dev_err(dev, "create null clk error\n");
return ERR_CAST(clk);
}
@@ -618,7 +618,7 @@ static int rsnd_adg_get_clkin(struct rsnd_priv *priv)
* No "adg" is not error
*/
clk = devm_clk_get(dev, "adg");
- if (IS_ERR_OR_NULL(clk))
+ if (IS_ERR(clk))
clk = rsnd_adg_null_clk_get(priv);
adg->adg = clk;
@@ -626,9 +626,9 @@ static int rsnd_adg_get_clkin(struct rsnd_priv *priv)
for (i = 0; i < clkin_size; i++) {
clk = devm_clk_get(dev, clkin_name[i]);
- if (IS_ERR_OR_NULL(clk))
+ if (IS_ERR(clk))
clk = rsnd_adg_null_clk_get(priv);
- if (IS_ERR_OR_NULL(clk))
+ if (IS_ERR(clk))
goto err;
adg->clkin[i] = clk;
--
2.53.0