]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: fsi: Deletion of unnecessary checks before the function call "clk_enable"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 3 Jan 2015 18:25:55 +0000 (19:25 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 5 Jan 2015 19:03:00 +0000 (19:03 +0000)
The clk_enable() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/fsi.c

index 8869971d7884b93e463db07bb304f23c71b3b2c3..d49f25f9efd3d14779f8af39ac4a13653d92a617 100644 (file)
@@ -820,12 +820,9 @@ static int fsi_clk_enable(struct device *dev,
                        return ret;
                }
 
-               if (clock->xck)
-                       clk_enable(clock->xck);
-               if (clock->ick)
-                       clk_enable(clock->ick);
-               if (clock->div)
-                       clk_enable(clock->div);
+               clk_enable(clock->xck);
+               clk_enable(clock->ick);
+               clk_enable(clock->div);
 
                clock->count++;
        }