From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Tue, 02 Dec 2014 13:41:47 +0000 Subject: [PATCH 1/1] ASoC: fsi: Deletion of unnecessary checks before the function call "clk_disable" Message-Id: <547DC19B.5080302@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> In-Reply-To: <5317A59D.4@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai , alsa-devel@alsa-project.org Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: Markus Elfring Date: Tue, 2 Dec 2014 14:34:30 +0100 The clk_disable() 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 88e5df4..8869971 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -842,12 +842,9 @@ static int fsi_clk_disable(struct device *dev, return -EINVAL; if (1 = clock->count--) { - if (clock->xck) - clk_disable(clock->xck); - if (clock->ick) - clk_disable(clock->ick); - if (clock->div) - clk_disable(clock->div); + clk_disable(clock->xck); + clk_disable(clock->ick); + clk_disable(clock->div); } return 0; -- 2.1.3