From: Markus Elfring Date: Tue, 2 Dec 2014 16:15:11 +0000 (+0100) Subject: ASoC: mop500: Deletion of unnecessary checks before the function call "of_node_put" X-Git-Tag: v4.9.8~5095^2~38^2~15^6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1679b532870f565bc184434f545cdbd3fdeff6cf;p=platform%2Fkernel%2Flinux-rpi3.git ASoC: mop500: Deletion of unnecessary checks before the function call "of_node_put" The of_node_put() 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/ux500/mop500.c b/sound/soc/ux500/mop500.c index ea9ba284..9f2d045 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -63,10 +63,8 @@ static void mop500_of_node_put(void) int i; for (i = 0; i < 2; i++) { - if (mop500_dai_links[i].cpu_of_node) - of_node_put(mop500_dai_links[i].cpu_of_node); - if (mop500_dai_links[i].codec_of_node) - of_node_put(mop500_dai_links[i].codec_of_node); + of_node_put(mop500_dai_links[i].cpu_of_node); + of_node_put(mop500_dai_links[i].codec_of_node); } }