X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fsoc%2Fcodecs%2Fak4535.c;fp=sound%2Fsoc%2Fcodecs%2Fak4535.c;h=dd3380202766cf0ff8d1aec6ea9193317f458fa1;hb=81d91acf8c093565f65383ae0349b9255fbb2d0d;hp=1f63d387a2f49e366b0cfe95ff539615dd6a5795;hpb=132ea5e9aa9ce13f62ba45db8e43ec887d1106e9;p=linux-2.6-omap-h63xx.git 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);