From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Sun, 04 Jan 2015 13:11:58 +0000 Subject: [PATCH 7/13] ASoC: fsi: Deletion of unnecessary checks before the function call "clk_enable" Message-Id: <54A93C1E.4050200@users.sourceforge.net> List-Id: References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.so urceforge.net> <54A9355F.4050102@users.sourceforge.net> In-Reply-To: <54A9355F.4050102@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Liam Girdwood , Mark Brown Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: Markus Elfring Date: Sat, 3 Jan 2015 19:25:55 +0100 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 --- sound/soc/sh/fsi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 8869971..d49f25f 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -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++; } -- 2.2.1