diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-27 14:56:23 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-27 14:56:23 +0100 |
commit | 8516e6483bc870dfa76184657c3ddf5a8906e6db (patch) | |
tree | a8839b373f031a23a1bc7caefb37545d9c853912 /sound/soc | |
parent | aab5d23ef9934a2421ad46cbb15e097f87464692 (diff) | |
parent | 50d4a790e65f5ac91a7b2720a19e80e862b40318 (diff) | |
download | kernel_goldelico_gta04-8516e6483bc870dfa76184657c3ddf5a8906e6db.zip kernel_goldelico_gta04-8516e6483bc870dfa76184657c3ddf5a8906e6db.tar.gz kernel_goldelico_gta04-8516e6483bc870dfa76184657c3ddf5a8906e6db.tar.bz2 |
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 46c5b4f..ca1be1d 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -62,7 +62,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) struct device_node *ssi_np, *codec_np; struct platform_device *ssi_pdev; struct i2c_client *codec_dev; - struct imx_sgtl5000_data *data; + struct imx_sgtl5000_data *data = NULL; int int_port, ext_port; int ret; @@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) goto fail; } - data->codec_clk = devm_clk_get(&codec_dev->dev, NULL); + data->codec_clk = clk_get(&codec_dev->dev, NULL); if (IS_ERR(data->codec_clk)) { ret = PTR_ERR(data->codec_clk); goto fail; @@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) return 0; fail: + if (data && !IS_ERR(data->codec_clk)) + clk_put(data->codec_clk); if (ssi_np) of_node_put(ssi_np); if (codec_np) @@ -185,6 +187,7 @@ static int imx_sgtl5000_remove(struct platform_device *pdev) struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); snd_soc_unregister_card(&data->card); + clk_put(data->codec_clk); return 0; } |