Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fix from Guenter Roeck:
"Fix arithmetic overflow in ntc_thermistor driver"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (ntc_thermistor) Avoid math overflow

+3 -3
+3 -3
drivers/hwmon/ntc_thermistor.c
··· 145 145 static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata) 146 146 { 147 147 struct iio_channel *channel = pdata->chan; 148 - unsigned int result; 148 + s64 result; 149 149 int val, ret; 150 150 151 151 ret = iio_read_channel_raw(channel, &val); ··· 155 155 } 156 156 157 157 /* unit: mV */ 158 - result = pdata->pullup_uv * val; 158 + result = pdata->pullup_uv * (s64) val; 159 159 result >>= 12; 160 160 161 - return result; 161 + return (int)result; 162 162 } 163 163 164 164 static const struct of_device_id ntc_match[] = {