From: Guennadi Liakhovetski guennadi.liakhovetski@linux.intel.com
Double negation is often used in the kernel to avoid explicit comparison to 0. However an "if (!!a == !!b)" test can be trivially reduced to "if (!a == !b)".
Signed-off-by: Guennadi Liakhovetski guennadi.liakhovetski@linux.intel.com --- sound/soc/soc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index aae450ba4f08..8c6b688837de 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1106,8 +1106,8 @@ static int soc_init_dai_link(struct snd_soc_card *card, * Codec must be specified by 1 of name or OF node, * not both or neither. */ - if (!!codec->name == - !!codec->of_node) { + if (!codec->name == + !codec->of_node) { dev_err(card->dev, "ASoC: Neither/both codec name/of_node are set for %s\n", link->name); return -EINVAL;