thermal: rk3368: fix gcc warning

drivers/thermal/rk3368_thermal.c: In function 'rk3368_thermal_get_temp':
drivers/thermal/rk3368_thermal.c:580:12: warning: 'val_cpu' may be used uninitialized in this function [-Wmaybe-uninitialized]
   old_data = tsadc_data;
   ~~~~~~~~~^~~~~~~~~~~~
drivers/thermal/rk3368_thermal.c:529:6: note: 'val_cpu' was declared here
  int val_cpu;
      ^~~~~~~

Change-Id: I365441507082cbbd0f7be01e5f0a09674af6230d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2019-10-15 17:59:35 +08:00
parent e2a024e1cc
commit 8959d2a951

View File

@@ -526,7 +526,7 @@ static int predict_temp(int temp)
static int get_raw_code_internal(void)
{
u32 val_cpu_pd;
int val_cpu;
int val_cpu = INVALID_TEMP;
int i;
struct rk3368_thermal_data *ctx = rk3368_thermal_get_data();