diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-10-07 15:29:58 -0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 12:22:40 +0100 |
commit | 84d4cbe9a60a1fdd35b4dd69951f31c518b467d8 (patch) | |
tree | 1fe3b184eb0249327a0a61ab9341924e4763f8e2 /sound | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | linux-84d4cbe9a60a1fdd35b4dd69951f31c518b467d8.tar.gz linux-84d4cbe9a60a1fdd35b4dd69951f31c518b467d8.tar.bz2 linux-84d4cbe9a60a1fdd35b4dd69951f31c518b467d8.zip |
ASoC: simple-card: Delete unneeded test before of_node_put
of_node_put() supports NULL as its argument, so the initial test is not
necessary.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/generic/simple-card.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index d1b7293c133e..4f192ee3cb16 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -368,12 +368,9 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, dai_link->cpu_dai_name = NULL; dai_link_of_err: - if (np) - of_node_put(np); - if (bitclkmaster) - of_node_put(bitclkmaster); - if (framemaster) - of_node_put(framemaster); + of_node_put(np); + of_node_put(bitclkmaster); + of_node_put(framemaster); return ret; } @@ -464,11 +461,9 @@ static int asoc_simple_card_unref(struct platform_device *pdev) num_links < card->num_links; num_links++, dai_link++) { np = (struct device_node *) dai_link->cpu_of_node; - if (np) - of_node_put(np); + of_node_put(np); np = (struct device_node *) dai_link->codec_of_node; - if (np) - of_node_put(np); + of_node_put(np); } return 0; } |