[PATCH] ASoC: Fix another cs4270 error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
Cc: Timur Tabi <timur@xxxxxxxxxxxxx>
---
 sound/soc/codecs/cs4270.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- linux-2.6.27-rc7.orig/sound/soc/codecs/cs4270.c	2008-09-27 17:45:47.000000000 +0200
+++ linux-2.6.27-rc7/sound/soc/codecs/cs4270.c	2008-09-27 18:10:52.000000000 +0200
@@ -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;
 }
 


-- 
Jean Delvare
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux