Skip to content

Commit 1458fae

Browse files
Chen Nibroonie
authored andcommitted
ASoC: ti: davinci-i2s: remove unnecessary NULL check before clk_disable_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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent d9a0693 commit 1458fae

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sound/soc/ti/davinci-i2s.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)
892892
err_unregister_component:
893893
snd_soc_unregister_component(&pdev->dev);
894894
err_disable_ext_clk:
895-
if (dev->ext_clk)
896-
clk_disable_unprepare(dev->ext_clk);
895+
clk_disable_unprepare(dev->ext_clk);
897896
err_disable_clk:
898897
clk_disable_unprepare(dev->clk);
899898

@@ -908,8 +907,7 @@ static void davinci_i2s_remove(struct platform_device *pdev)
908907

909908
clk_disable_unprepare(dev->clk);
910909

911-
if (dev->ext_clk)
912-
clk_disable_unprepare(dev->ext_clk);
910+
clk_disable_unprepare(dev->ext_clk);
913911
}
914912

915913
static const struct of_device_id davinci_i2s_match[] __maybe_unused = {

0 commit comments

Comments
 (0)