return -ENOMEM;
wm8903->dev = &i2c->dev;
- wm8903->regmap = regmap_init_i2c(i2c, &wm8903_regmap);
+ wm8903->regmap = devm_regmap_init_i2c(i2c, &wm8903_regmap);
if (IS_ERR(wm8903->regmap)) {
ret = PTR_ERR(wm8903->regmap);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
return 0;
err:
- regmap_exit(wm8903->regmap);
return ret;
}
struct wm8903_priv *wm8903 = i2c_get_clientdata(client);
wm8903_free_gpio(wm8903);
- regmap_exit(wm8903->regmap);
snd_soc_unregister_codec(&client->dev);
return 0;