Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284059
b: refs/heads/master
c: a3bb8f3
h: refs/heads/master
i:
  284057: 4b58d83
  284055: 7452892
v: v3
  • Loading branch information
Julia Lawall authored and Mark Brown committed Jan 2, 2012
1 parent 780200f commit 79fa809
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6945e9f9dfee897891a8ac620ce1621a2daf7e02
refs/heads/master: a3bb8f3f818667872728085497b3a3ab3caba371
14 changes: 4 additions & 10 deletions trunk/sound/soc/davinci/davinci-vcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ static int davinci_vcif_probe(struct platform_device *pdev)
struct davinci_vcif_dev *davinci_vcif_dev;
int ret;

davinci_vcif_dev = kzalloc(sizeof(struct davinci_vcif_dev), GFP_KERNEL);
davinci_vcif_dev = devm_kzalloc(&pdev->dev,
sizeof(struct davinci_vcif_dev),
GFP_KERNEL);
if (!davinci_vcif_dev) {
dev_dbg(&pdev->dev,
"could not allocate memory for private data\n");
Expand All @@ -235,23 +237,15 @@ static int davinci_vcif_probe(struct platform_device *pdev)
ret = snd_soc_register_dai(&pdev->dev, &davinci_vcif_dai);
if (ret != 0) {
dev_err(&pdev->dev, "could not register dai\n");
goto fail;
return ret;
}

return 0;

fail:
kfree(davinci_vcif_dev);

return ret;
}

static int davinci_vcif_remove(struct platform_device *pdev)
{
struct davinci_vcif_dev *davinci_vcif_dev = dev_get_drvdata(&pdev->dev);

snd_soc_unregister_dai(&pdev->dev);
kfree(davinci_vcif_dev);

return 0;
}
Expand Down

0 comments on commit 79fa809

Please sign in to comment.