Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
unsigned int devid = 0;
unsigned int reg;
unsigned int devid = 0;
unsigned int reg;
- cs42l73 = kzalloc((sizeof *cs42l73), GFP_KERNEL);
+ cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
+ GFP_KERNEL);
if (!cs42l73) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
return -ENOMEM;
if (!cs42l73) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
return -ENOMEM;
regmap_exit(cs42l73->regmap);
err:
regmap_exit(cs42l73->regmap);
err:
snd_soc_unregister_codec(&client->dev);
regmap_exit(cs42l73->regmap);
snd_soc_unregister_codec(&client->dev);
regmap_exit(cs42l73->regmap);