summaryrefslogtreecommitdiff
path: root/sound/soc/bcm
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/bcm')
-rw-r--r--sound/soc/bcm/cygnus-ssp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index e0ce0232eb1e..47706ae0a31f 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1298,7 +1298,6 @@ static int audio_clk_init(struct platform_device *pdev,
static int cygnus_ssp_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct device_node *child_node;
struct cygnus_audio *cygaud;
int err;
int node_count;
@@ -1331,16 +1330,15 @@ static int cygnus_ssp_probe(struct platform_device *pdev)
active_port_count = 0;
- for_each_available_child_of_node(pdev->dev.of_node, child_node) {
+ for_each_available_child_of_node_scoped(pdev->dev.of_node, child_node) {
err = parse_ssp_child_node(pdev, child_node, cygaud,
&cygnus_ssp_dai[active_port_count]);
/* negative is err, 0 is active and good, 1 is disabled */
- if (err < 0) {
- of_node_put(child_node);
+ if (err < 0)
return err;
- }
- else if (!err) {
+
+ if (!err) {
dev_dbg(dev, "Activating DAI: %s\n",
cygnus_ssp_dai[active_port_count].name);
active_port_count++;