Skip to content

Commit

Permalink
ASoC: ti: davinci-i2s: remove unnecessary NULL check before clk_disab…
Browse files Browse the repository at this point in the history
…le_unprepare()

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>
  • Loading branch information
Chen Ni authored and Mark Brown committed Mar 16, 2025
1 parent d9a0693 commit 1458fae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sound/soc/ti/davinci-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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 = {
Expand Down

0 comments on commit 1458fae

Please sign in to comment.