forked from Minki/linux
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>
This commit is contained in:
parent
0099c76285
commit
1679b53287
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user