Skip to contentSkip to conversation

ASoC: Fix another cs4270 error path

PATCH In review Jean Delvare 2 participants 2 messages Sep 27, 2008 – Sep 29, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Fix another cs4270 error path

Conversion to new-style i2c driver missed the error path of the probe function. Fix it.

---
 sound/soc/codecs/cs4270.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
sound/soc/codecs/cs4270.c +1 -6
@@ -610,17 +610,12 @@ static int cs4270_i2c_probe(struct i2c_c
 	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;
 }
 
Signature · 1 line
Jean Delvare
#1 lore raw

At Sat, 27 Sep 2008 20:30:52 +0200,

Quoted 6 lines · Jean Delvare

Conversion to new-style i2c driver missed the error path of the probe function. Fix it.

Thanks, I'll push it together with Timur's original i2c-conversion patch.

Takashi

Quoted 34 lines
---
 sound/soc/codecs/cs4270.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
sound/soc/codecs/cs4270.c +1 -6
@@ -610,17 +610,12 @@ static int cs4270_i2c_probe(struct i2c_c
 	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;
 }
 
Signature · 6 lines
-- 
Jean Delvare
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel