Skip to content

Commit

Permalink
ASoC: mc13783: Add missing of_node_put
Browse files Browse the repository at this point in the history
of_get_child_by_name expects of_node_put be called when done.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Sachin Kamat authored and Mark Brown committed Jun 21, 2014
1 parent 7171511 commit a28d167
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/codecs/mc13783.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,11 +766,11 @@ static int __init mc13783_codec_probe(struct platform_device *pdev)

ret = of_property_read_u32(np, "adc-port", &priv->adc_ssi_port);
if (ret)
return ret;
goto out;

ret = of_property_read_u32(np, "dac-port", &priv->dac_ssi_port);
if (ret)
return ret;
goto out;
}

dev_set_drvdata(&pdev->dev, priv);
Expand All @@ -783,6 +783,8 @@ static int __init mc13783_codec_probe(struct platform_device *pdev)
ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_mc13783,
mc13783_dai_async, ARRAY_SIZE(mc13783_dai_async));

out:
of_node_put(np);
return ret;
}

Expand Down

0 comments on commit a28d167

Please sign in to comment.