]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: ASoC: Fix another cs4270 error path
authorJean Delvare <khali@linux-fr.org>
Sat, 27 Sep 2008 18:30:52 +0000 (20:30 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 29 Sep 2008 10:53:24 +0000 (12:53 +0200)
Conversion to new-style i2c driver missed the error path of the
probe function. Fix it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/codecs/cs4270.c

index 82d94f00aa456e50826b744b5bad5b429eda946e..d68650de39bcb93bef72b7cba61feb4bb13816ee 100644 (file)
@@ -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;
 }