Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Sep 27, 2013
2 parents aab5d23 + 50d4a79 commit 8516e64
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sound/soc/fsl/imx-sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 8516e64

Please sign in to comment.