Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84dbbf9e authored by Arun KS's avatar Arun KS
Browse files

thermal: adc_tm: Correct variable initialization



This initialize the variable chip to avoid getting any random value.

Change-Id: I212ff2ea58329bc28b62177bfea39c02839d3554
Signed-off-by: default avatarArun KS <arunks@codeaurora.org>
parent 65119ded
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -275,6 +275,8 @@ static int32_t adc_tm5_thr_update(struct adc_tm_sensor *sensor,
	struct adc_tm_config tm_config;
	struct adc_tm_chip *chip;

	chip = sensor->chip;

	ret = adc_tm5_get_btm_idx(chip,
		sensor->btm_ch, &btm_chan_idx);
	if (ret < 0) {
@@ -282,8 +284,6 @@ static int32_t adc_tm5_thr_update(struct adc_tm_sensor *sensor,
		return ret;
	}

	chip = sensor->chip;

	tm_config.high_thr_voltage = (int64_t)high_thr;
	tm_config.low_thr_voltage = (int64_t)low_thr;
	tm_config.prescal = sensor->prescaling;