Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283987
b: refs/heads/master
c: 3922d51
h: refs/heads/master
i:
  283985: 3a694eb
  283983: de69244
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 20, 2011
1 parent 52c7d88 commit f74d764
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: 07cdf36d8c4ba4ad0db13228eb25bcd3d5138b29
refs/heads/master: 3922d5180ffa605b08c50c13a7c9db68ab6bbc19
6 changes: 2 additions & 4 deletions trunk/sound/soc/codecs/ak4104.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ static int ak4104_spi_probe(struct spi_device *spi)
if (ret < 0)
return ret;

ak4104 = kzalloc(sizeof(struct ak4104_private), GFP_KERNEL);
ak4104 = devm_kzalloc(&spi->dev, sizeof(struct ak4104_private),
GFP_KERNEL);
if (ak4104 == NULL)
return -ENOMEM;

Expand All @@ -271,15 +272,12 @@ static int ak4104_spi_probe(struct spi_device *spi)

ret = snd_soc_register_codec(&spi->dev,
&soc_codec_device_ak4104, &ak4104_dai, 1);
if (ret < 0)
kfree(ak4104);
return ret;
}

static int __devexit ak4104_spi_remove(struct spi_device *spi)
{
snd_soc_unregister_codec(&spi->dev);
kfree(spi_get_drvdata(spi));
return 0;
}

Expand Down

0 comments on commit f74d764

Please sign in to comment.