aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/generic
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-10-07 14:29:58 -0400
committerMark Brown <broonie@kernel.org>2014-10-20 07:22:40 -0400
commit84d4cbe9a60a1fdd35b4dd69951f31c518b467d8 (patch)
tree1fe3b184eb0249327a0a61ab9341924e4763f8e2 /sound/soc/generic
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
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/soc/generic')
-rw-r--r--sound/soc/generic/simple-card.c15
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,
368 dai_link->cpu_dai_name = NULL; 368 dai_link->cpu_dai_name = NULL;
369 369
370dai_link_of_err: 370dai_link_of_err:
371 if (np) 371 of_node_put(np);
372 of_node_put(np); 372 of_node_put(bitclkmaster);
373 if (bitclkmaster) 373 of_node_put(framemaster);
374 of_node_put(bitclkmaster);
375 if (framemaster)
376 of_node_put(framemaster);
377 return ret; 374 return ret;
378} 375}
379 376
@@ -464,11 +461,9 @@ static int asoc_simple_card_unref(struct platform_device *pdev)
464 num_links < card->num_links; 461 num_links < card->num_links;
465 num_links++, dai_link++) { 462 num_links++, dai_link++) {
466 np = (struct device_node *) dai_link->cpu_of_node; 463 np = (struct device_node *) dai_link->cpu_of_node;
467 if (np) 464 of_node_put(np);
468 of_node_put(np);
469 np = (struct device_node *) dai_link->codec_of_node; 465 np = (struct device_node *) dai_link->codec_of_node;
470 if (np) 466 of_node_put(np);
471 of_node_put(np);
472 } 467 }
473 return 0; 468 return 0;
474} 469}