diff options
| -rw-r--r-- | sound/soc/codecs/tlv320aic31xx.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index 1f243c2c98fd..e463ae7fe1f4 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c | |||
| @@ -1229,7 +1229,6 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c, | |||
| 1229 | return -ENOMEM; | 1229 | return -ENOMEM; |
| 1230 | 1230 | ||
| 1231 | aic31xx->regmap = devm_regmap_init_i2c(i2c, regmap_config); | 1231 | aic31xx->regmap = devm_regmap_init_i2c(i2c, regmap_config); |
| 1232 | |||
| 1233 | if (IS_ERR(aic31xx->regmap)) { | 1232 | if (IS_ERR(aic31xx->regmap)) { |
| 1234 | ret = PTR_ERR(aic31xx->regmap); | 1233 | ret = PTR_ERR(aic31xx->regmap); |
| 1235 | dev_err(&i2c->dev, "Failed to allocate register map: %d\n", | 1234 | dev_err(&i2c->dev, "Failed to allocate register map: %d\n", |
| @@ -1242,18 +1241,14 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c, | |||
| 1242 | 1241 | ||
| 1243 | aic31xx_device_init(aic31xx); | 1242 | aic31xx_device_init(aic31xx); |
| 1244 | 1243 | ||
| 1245 | ret = snd_soc_register_codec(&i2c->dev, &soc_codec_driver_aic31xx, | 1244 | return snd_soc_register_codec(&i2c->dev, &soc_codec_driver_aic31xx, |
| 1246 | aic31xx_dai_driver, | 1245 | aic31xx_dai_driver, |
| 1247 | ARRAY_SIZE(aic31xx_dai_driver)); | 1246 | ARRAY_SIZE(aic31xx_dai_driver)); |
| 1248 | |||
| 1249 | return ret; | ||
| 1250 | } | 1247 | } |
| 1251 | 1248 | ||
| 1252 | static int aic31xx_i2c_remove(struct i2c_client *i2c) | 1249 | static int aic31xx_i2c_remove(struct i2c_client *i2c) |
| 1253 | { | 1250 | { |
| 1254 | struct aic31xx_priv *aic31xx = dev_get_drvdata(&i2c->dev); | 1251 | snd_soc_unregister_codec(&i2c->dev); |
| 1255 | |||
| 1256 | kfree(aic31xx); | ||
| 1257 | return 0; | 1252 | return 0; |
| 1258 | } | 1253 | } |
| 1259 | 1254 | ||
| @@ -1275,7 +1270,7 @@ static struct i2c_driver aic31xx_i2c_driver = { | |||
| 1275 | .of_match_table = of_match_ptr(tlv320aic31xx_of_match), | 1270 | .of_match_table = of_match_ptr(tlv320aic31xx_of_match), |
| 1276 | }, | 1271 | }, |
| 1277 | .probe = aic31xx_i2c_probe, | 1272 | .probe = aic31xx_i2c_probe, |
| 1278 | .remove = (aic31xx_i2c_remove), | 1273 | .remove = aic31xx_i2c_remove, |
| 1279 | .id_table = aic31xx_i2c_id, | 1274 | .id_table = aic31xx_i2c_id, |
| 1280 | }; | 1275 | }; |
| 1281 | 1276 | ||
