]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: ti: davinci-i2s: remove unnecessary NULL check before clk_disable_unprepare()
authorChen Ni <nichen@iscas.ac.cn>
Wed, 12 Mar 2025 03:35:09 +0000 (11:35 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 16 Mar 2025 23:33:36 +0000 (23:33 +0000)
clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL.
Remove unneeded NULL check for dev->ext_clk here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20250312033509.1235268-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/davinci-i2s.c

index d682b98d6848043466cd14e9928b3e1022fadc0a..059967f0e632c75d0dbc02a4d8d4e2bd16ed67a1 100644 (file)
@@ -892,8 +892,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)
 err_unregister_component:
        snd_soc_unregister_component(&pdev->dev);
 err_disable_ext_clk:
-       if (dev->ext_clk)
-               clk_disable_unprepare(dev->ext_clk);
+       clk_disable_unprepare(dev->ext_clk);
 err_disable_clk:
        clk_disable_unprepare(dev->clk);
 
@@ -908,8 +907,7 @@ static void davinci_i2s_remove(struct platform_device *pdev)
 
        clk_disable_unprepare(dev->clk);
 
-       if (dev->ext_clk)
-               clk_disable_unprepare(dev->ext_clk);
+       clk_disable_unprepare(dev->ext_clk);
 }
 
 static const struct of_device_id davinci_i2s_match[] __maybe_unused = {