diff options
Diffstat (limited to 'sound/soc/codecs/tlv320dac33.c')
-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 | ||