Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
static struct spi_driver ad1938_spi_driver = {
.driver = {
- .name = "ad1938-spi",
+ .name = "ad1938",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
ret = snd_soc_register_codec(codec);
if (ret != 0) {
dev_err(codec->dev, "Failed to register codec: %d\n", ret);
+ kfree(ad1938);
return ret;
}
if (ret != 0) {
dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
snd_soc_unregister_codec(codec);
+ kfree(ad1938);
return ret;
}