From: Jean Delvare Date: Sat, 27 Sep 2008 18:30:52 +0000 (+0200) Subject: ALSA: ASoC: Fix another cs4270 error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9778e9a0eafe796c2affcd1fa1fa8a3765e026e6;p=linux-beck.git ALSA: ASoC: Fix another cs4270 error path Conversion to new-style i2c driver missed the error path of the probe function. Fix it. Signed-off-by: Jean Delvare Cc: Timur Tabi Signed-off-by: Takashi Iwai --- diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 82d94f00aa45..d68650de39bc 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -610,17 +610,12 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client, return 0; error: - if (codec->control_data) { - i2c_detach_client(i2c_client); - codec->control_data = NULL; - } + codec->control_data = NULL; kfree(codec->reg_cache); codec->reg_cache = NULL; codec->reg_cache_size = 0; - kfree(i2c_client); - return ret; }