mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
hwmon: (ntc_thermistor) Simplify if sequence
Replace unnecessary if with else statement. This fixes the following (false) compile warning reported with some combinations of C compiler version and configuration. drivers/hwmon/ntc_thermistor.c: In function 'ntc_show_temp': drivers/hwmon/ntc_thermistor.c:225: warning: 'low' may be used uninitialized in this function drivers/hwmon/ntc_thermistor.c:225: note: 'low' was declared here drivers/hwmon/ntc_thermistor.c:225: warning: 'high' may be used uninitialized in this function drivers/hwmon/ntc_thermistor.c:225: note: 'high' was declared here drivers/hwmon/ntc_thermistor.c:294: warning: 'temp' may be used uninitialized in this function Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
This commit is contained in:
parent
fcb8ce5cfe
commit
858a914324
1 changed files with 1 additions and 2 deletions
|
|
@ -211,8 +211,7 @@ static int lookup_comp(struct ntc_data *data,
|
|||
if (data->comp[mid].ohm <= ohm) {
|
||||
*i_low = mid;
|
||||
*i_high = mid - 1;
|
||||
}
|
||||
if (data->comp[mid].ohm > ohm) {
|
||||
} else {
|
||||
*i_low = mid + 1;
|
||||
*i_high = mid;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue