diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-12-02 11:15:11 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-03 13:31:03 -0500 |
commit | 1679b532870f565bc184434f545cdbd3fdeff6cf (patch) | |
tree | 7a205885d455a9f73158162049db8abee737da94 | |
parent | 0099c762855eeee8d3eacc11fcc1e0819e77b2ed (diff) |
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 <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/ux500/mop500.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index ea9ba2844510..9f2d045ee118 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c | |||
@@ -63,10 +63,8 @@ static void mop500_of_node_put(void) | |||
63 | int i; | 63 | int i; |
64 | 64 | ||
65 | for (i = 0; i < 2; i++) { | 65 | for (i = 0; i < 2; i++) { |
66 | if (mop500_dai_links[i].cpu_of_node) | 66 | of_node_put(mop500_dai_links[i].cpu_of_node); |
67 | of_node_put(mop500_dai_links[i].cpu_of_node); | 67 | of_node_put(mop500_dai_links[i].codec_of_node); |
68 | if (mop500_dai_links[i].codec_of_node) | ||
69 | of_node_put(mop500_dai_links[i].codec_of_node); | ||
70 | } | 68 | } |
71 | } | 69 | } |
72 | 70 | ||