From: Markus Elfring Date: Tue, 2 Dec 2014 13:34:30 +0000 (+0100) Subject: ASoC: fsi: Deletion of unnecessary checks before the function call "clk_disable" X-Git-Tag: omap-for-v3.19/fixes-rc1~126^2~20^2~18^6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e98c89e05e8b33ad40efff2012c1404e39d12ad8;p=pandora-kernel.git ASoC: fsi: Deletion of unnecessary checks before the function call "clk_disable" 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 66fddec9543d..eefb16100cd1 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;