<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 2, 2022 at 3:14 PM <<a href="mailto:cgel.zte@gmail.com">cgel.zte@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Minghao Chi <<a href="mailto:chi.minghao@zte.com.cn" target="_blank">chi.minghao@zte.com.cn</a>><br>
<br>
Because clk_disable_unprepare already checked NULL clock<br>
parameter, so the additional checks are unnecessary, just remove them.<br>
<br>
Reported-by: Zeal Robot <<a href="mailto:zealci@zte.com.cn" target="_blank">zealci@zte.com.cn</a>><br>
Signed-off-by: Minghao Chi <<a href="mailto:chi.minghao@zte.com.cn" target="_blank">chi.minghao@zte.com.cn</a>><br>
---<br>
 sound/soc/fsl/imx-audmux.c | 6 ++----<br>
 1 file changed, 2 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c<br>
index dfa05d40b276..f434fa7decc1 100644<br>
--- a/sound/soc/fsl/imx-audmux.c<br>
+++ b/sound/soc/fsl/imx-audmux.c<br>
@@ -71,8 +71,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,<br>
        ptcr = readl(audmux_base + IMX_AUDMUX_V2_PTCR(port));<br>
        pdcr = readl(audmux_base + IMX_AUDMUX_V2_PDCR(port));<br>
<br>
-       if (audmux_clk)<br>
-               clk_disable_unprepare(audmux_clk);<br>
+       clk_disable_unprepare(audmux_clk);<br></blockquote><div><br></div><div>I think the check of audmux_clk before "clk_prepare_enable"  also<br></div><div>can be removed?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
        buf = kmalloc(PAGE_SIZE, GFP_KERNEL);<br>
        if (!buf)<br>
@@ -218,8 +217,7 @@ int imx_audmux_v2_configure_port(unsigned int port, unsigned int ptcr,<br>
        writel(ptcr, audmux_base + IMX_AUDMUX_V2_PTCR(port));<br>
        writel(pdcr, audmux_base + IMX_AUDMUX_V2_PDCR(port));<br>
<br>
-       if (audmux_clk)<br>
-               clk_disable_unprepare(audmux_clk);<br>
+       clk_disable_unprepare(audmux_clk);<br></blockquote><div><br></div><div>ditto</div><div><br></div><div><div>best regards</div><div>wang shengjiu</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
        return 0;<br>
 }<br>
-- <br>
2.25.1<br>
<br>
<br>
</blockquote></div></div>