diff options
Diffstat (limited to 'sound/soc/codecs/ak4535.c')
-rw-r--r-- | sound/soc/codecs/ak4535.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index 1f63d387a2f4..dd3380202766 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
@@ -659,7 +659,8 @@ static int ak4535_remove(struct platform_device *pdev) | |||
659 | snd_soc_free_pcms(socdev); | 659 | snd_soc_free_pcms(socdev); |
660 | snd_soc_dapm_free(socdev); | 660 | snd_soc_dapm_free(socdev); |
661 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 661 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
662 | i2c_unregister_device(codec->control_data); | 662 | if (codec->control_data) |
663 | i2c_unregister_device(codec->control_data); | ||
663 | i2c_del_driver(&ak4535_i2c_driver); | 664 | i2c_del_driver(&ak4535_i2c_driver); |
664 | #endif | 665 | #endif |
665 | kfree(codec->private_data); | 666 | kfree(codec->private_data); |