Преглед на файлове

ASoC: tpa6130a2: Get rid of compile warning from tpa6130a2_power

Patch "ASoC: tpa6130a2: Fix unbalanced regulator disables" introduced a
compiler warning "‘ret’ may be used uninitialized in this function".
Initialize ret to zero to get rid of it and making sure that the function
does not return any random error code when the code is falling through.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jarkko Nikula преди 14 години
родител
ревизия
75e3f3137c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      sound/soc/codecs/tpa6130a2.c

+ 1 - 1
sound/soc/codecs/tpa6130a2.c

@@ -119,7 +119,7 @@ static int tpa6130a2_power(int power)
 {
 {
 	struct	tpa6130a2_data *data;
 	struct	tpa6130a2_data *data;
 	u8	val;
 	u8	val;
-	int	ret;
+	int	ret = 0;
 
 
 	BUG_ON(tpa6130a2_client == NULL);
 	BUG_ON(tpa6130a2_client == NULL);
 	data = i2c_get_clientdata(tpa6130a2_client);
 	data = i2c_get_clientdata(tpa6130a2_client);