diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-28 23:11:00 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-02 07:28:13 -0500 |
commit | a54877d7456ffa88c95d7eb587971792cb1892d6 (patch) | |
tree | 308f12b7e7fd088cb98648e1b4dbc356cff85c94 /sound/soc | |
parent | 7fd8a67446aded9d25e0ae1d94d19105f1620af5 (diff) |
ASoC: Convert tlv320dac33 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index c7a61fbdae4b..f0aad26cdb31 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -1532,7 +1532,8 @@ static int __devinit dac33_i2c_probe(struct i2c_client *client, | |||
1532 | } | 1532 | } |
1533 | pdata = client->dev.platform_data; | 1533 | pdata = client->dev.platform_data; |
1534 | 1534 | ||
1535 | dac33 = kzalloc(sizeof(struct tlv320dac33_priv), GFP_KERNEL); | 1535 | dac33 = devm_kzalloc(&client->dev, sizeof(struct tlv320dac33_priv), |
1536 | GFP_KERNEL); | ||
1536 | if (dac33 == NULL) | 1537 | if (dac33 == NULL) |
1537 | return -ENOMEM; | 1538 | return -ENOMEM; |
1538 | 1539 | ||
@@ -1587,7 +1588,6 @@ err_get: | |||
1587 | if (dac33->power_gpio >= 0) | 1588 | if (dac33->power_gpio >= 0) |
1588 | gpio_free(dac33->power_gpio); | 1589 | gpio_free(dac33->power_gpio); |
1589 | err_gpio: | 1590 | err_gpio: |
1590 | kfree(dac33); | ||
1591 | return ret; | 1591 | return ret; |
1592 | } | 1592 | } |
1593 | 1593 | ||
@@ -1604,8 +1604,6 @@ static int __devexit dac33_i2c_remove(struct i2c_client *client) | |||
1604 | regulator_bulk_free(ARRAY_SIZE(dac33->supplies), dac33->supplies); | 1604 | regulator_bulk_free(ARRAY_SIZE(dac33->supplies), dac33->supplies); |
1605 | 1605 | ||
1606 | snd_soc_unregister_codec(&client->dev); | 1606 | snd_soc_unregister_codec(&client->dev); |
1607 | kfree(dac33); | ||
1608 | |||
1609 | return 0; | 1607 | return 0; |
1610 | } | 1608 | } |
1611 | 1609 | ||