aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-sgtl5000.c
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-11-07 11:34:46 -0500
committerRob Herring <rob.herring@calxeda.com>2013-11-07 11:34:46 -0500
commitb5480950c6cbb7b07ab1c1a5af0dc661a1cb6f24 (patch)
treeb5fcb00387a838beb2bcf2f8ed2fd3d6d460c8ae /sound/soc/fsl/imx-sgtl5000.c
parente363bbac316ffb5daaf45d855f82680148cafe20 (diff)
parent355e62f5ad12b005c862838156262eb2df2f8dff (diff)
Merge remote-tracking branch 'grant/devicetree/next' into for-next
Diffstat (limited to 'sound/soc/fsl/imx-sgtl5000.c')
-rw-r--r--sound/soc/fsl/imx-sgtl5000.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 46c5b4fdfc52..ca1be1d9dcf0 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)
62 struct device_node *ssi_np, *codec_np; 62 struct device_node *ssi_np, *codec_np;
63 struct platform_device *ssi_pdev; 63 struct platform_device *ssi_pdev;
64 struct i2c_client *codec_dev; 64 struct i2c_client *codec_dev;
65 struct imx_sgtl5000_data *data; 65 struct imx_sgtl5000_data *data = NULL;
66 int int_port, ext_port; 66 int int_port, ext_port;
67 int ret; 67 int ret;
68 68
@@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
128 goto fail; 128 goto fail;
129 } 129 }
130 130
131 data->codec_clk = devm_clk_get(&codec_dev->dev, NULL); 131 data->codec_clk = clk_get(&codec_dev->dev, NULL);
132 if (IS_ERR(data->codec_clk)) { 132 if (IS_ERR(data->codec_clk)) {
133 ret = PTR_ERR(data->codec_clk); 133 ret = PTR_ERR(data->codec_clk);
134 goto fail; 134 goto fail;
@@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
172 return 0; 172 return 0;
173 173
174fail: 174fail:
175 if (data && !IS_ERR(data->codec_clk))
176 clk_put(data->codec_clk);
175 if (ssi_np) 177 if (ssi_np)
176 of_node_put(ssi_np); 178 of_node_put(ssi_np);
177 if (codec_np) 179 if (codec_np)
@@ -185,6 +187,7 @@ static int imx_sgtl5000_remove(struct platform_device *pdev)
185 struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); 187 struct imx_sgtl5000_data *data = platform_get_drvdata(pdev);
186 188
187 snd_soc_unregister_card(&data->card); 189 snd_soc_unregister_card(&data->card);
190 clk_put(data->codec_clk);
188 191
189 return 0; 192 return 0;
190} 193}