Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84d4cbe9 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown
Browse files

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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f114040e
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -368,11 +368,8 @@ 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);
	return ret;
}
@@ -464,10 +461,8 @@ 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);
		np = (struct device_node *) dai_link->codec_of_node;
		if (np)
		of_node_put(np);
	}
	return 0;