aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/ak4535.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-04-07 04:17:31 +0200
committerTakashi Iwai <tiwai@suse.de>2009-04-07 04:17:31 +0200
commite50a96e7c2aa523175b7b5642641327e2c587151 (patch)
tree244922976724696050db8c3705fd5f40a08bf714 /sound/soc/codecs/ak4535.c
parent8c941de17679345a52fe53ac32d8aa53ebea369d (diff)
parent5c15a6869a75000fecea61e9985f4753311ec534 (diff)
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'sound/soc/codecs/ak4535.c')
-rw-r--r--sound/soc/codecs/ak4535.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 1f63d387a2f..dd338020276 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)
snd_soc_free_pcms(socdev);
snd_soc_dapm_free(socdev);
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
- i2c_unregister_device(codec->control_data);
+ if (codec->control_data)
+ i2c_unregister_device(codec->control_data);
i2c_del_driver(&ak4535_i2c_driver);
#endif
kfree(codec->private_data);