linux-imx/drivers/hwmon
Guenter Roeck df3fbf21ff hwmon: (g762) Fix overflows and crash seen when writing limit attributes
commit 4fccd4a1e8 upstream.

Fix overflows seen when writing into fan speed limit attributes.
Also fix crash due to division by zero, seen when certain very
large values (such as 2147483648, or 0x80000000) are written
into fan speed limit attributes.

Fixes: 594fbe713b ("Add support for GMT G762/G763 PWM fan controllers")
Cc: Arnaud Ebalard <arno@natisbad.org>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
2017-01-26 17:40:13 +01:00
..
pmbus hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
ab8500.c hwmon: Add ST-Ericsson ABX500 hwmon driver 2013-04-16 18:27:52 -07:00
abituguru.c hwmon: fix error return code in abituguru_probe() 2013-05-13 08:07:13 -07:00
abituguru3.c hwmon: (abituguru3) Remove redundant platform_set_drvdata() 2013-06-21 10:05:03 -07:00
abx500.c hwmon: (abx500) Staticize abx500_temp_attributes 2013-07-14 16:24:25 -07:00
abx500.h hwmon: Add ST-Ericsson ABX500 hwmon driver 2013-04-16 18:27:52 -07:00
acpi_power_meter.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
ad7314.c hwmon: (ad7314) use spi_get_drvdata() and spi_set_drvdata() 2013-04-07 21:16:42 -07:00
ad7414.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
ad7418.c hwmon: (ad7418) Convert to use devm_ functions 2012-09-23 21:08:29 -07:00
adcxx.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00
adm1021.c hwmon: (adm1021) Fix cache problem when writing temperature limits 2014-07-18 15:51:18 +02:00
adm1025.c hwmon: (adm1025) Convert to use devm_ functions 2012-07-21 21:48:38 -07:00
adm1026.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
adm1029.c hwmon: (adm1029) Ensure the fan_div cache is updated in set_fan_div 2014-07-18 15:51:17 +02:00
adm1031.c hwmon: (adm1031) Fix writes to limit registers 2014-07-18 15:51:17 +02:00
adm9240.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
ads1015.c hwmon: (ads1015) Handle negative conversion values correctly 2016-03-03 12:46:05 +01:00
ads7828.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
ads7871.c hwmon: Fix CamelCase checkpatch warnings 2013-04-07 21:16:40 -07:00
adt7x10.c hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7x10.h hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7310.c hwmon: (adt7310) Fix sparse warning 2013-04-07 21:16:41 -07:00
adt7410.c hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7411.c hwmon: (adt7411) set bit 3 in CFG1 register 2016-10-07 10:06:47 +02:00
adt7462.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
adt7470.c hwmon: (adt7470) Fix writes to temperature limit registers 2014-07-29 16:56:53 +02:00
adt7475.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
amc6821.c hwmon: (amc6821) Fix possible race condition bug 2014-09-03 21:31:20 +02:00
applesmc.c hwmon: (applesmc) Always read until end of data 2013-10-09 09:48:55 -07:00
asb100.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
asc7621.c hwmon: Fix CamelCase checkpatch warnings 2013-04-07 21:16:40 -07:00
asus_atk0110.c ACPI: Remove useless type argument of driver .remove() operation 2013-01-26 00:37:24 +01:00
atxp1.c hwmon: (atxp1) Convert to use devm_ functions 2012-07-21 21:48:39 -07:00
coretemp.c hwmon: (coretemp) Increase limit of maximum core ID from 32 to 128. 2016-04-11 16:43:54 +02:00
da9052-hwmon.c hwmon: (da9052) Don't use dash in the name attribute 2014-07-29 16:56:53 +02:00
da9055-hwmon.c hwmon: (da9055) Don't use dash in the name attribute 2014-07-29 16:56:52 +02:00
dme1737.c hwmon: (dme1737) Prevent overflow problem when writing large limits 2014-09-03 21:31:23 +02:00
ds620.c hwmon: (ds620) Fix overflows seen when writing temperature limits 2017-01-26 17:40:12 +01:00
ds1621.c hwmon: (ds1621) Update zbits after conversion rate change 2014-10-13 15:41:23 +02:00
emc6w201.c hwmon: (emc6w201) Do not declare enum variable 2013-09-06 14:05:43 +02:00
emc1403.c hwmon: (emc1403) Support full range of known chip revision numbers 2014-06-06 11:40:24 +02:00
emc2103.c hwmon: (emc2103) Clamp limits instead of bailing out 2014-07-18 15:51:17 +02:00
f71805f.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
f71882fg.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
f75375s.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
fam15h_power.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
fschmd.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
g760a.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
g762.c hwmon: (g762) Fix overflows and crash seen when writing limit attributes 2017-01-26 17:40:13 +01:00
gl518sm.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
gl520sm.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
gpio-fan.c hwmon: (gpio-fan) Prevent overflow problem when writing large limits 2014-09-03 21:31:21 +02:00
hih6130.c hwmon: HIH-6130: Support I2C bus drivers without I2C_FUNC_SMBUS_QUICK 2013-12-20 07:48:53 -08:00
htu21.c hwmon: (htu21) Add Measurement Specialties HTU21D support 2013-08-29 09:09:12 -07:00
hwmon-vid.c hwmon: (hwmon-vid) Add __maybe_unused attribute to dummy variable 2013-09-10 06:28:17 -07:00
hwmon.c hwmon: Fix PCI device reference leak in quirk 2012-12-19 22:16:59 +01:00
i5k_amb.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
ibmaem.c hwmon: (ibmaem) Fix return value 2013-09-11 13:01:32 -07:00
ibmpex.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
iio_hwmon.c hwmon: (iio_hwmon) add alias table 2013-06-27 10:29:03 -07:00
ina2xx.c hwmon: (ina2xx) Cast to s16 on shunt and current regs 2014-07-17 15:04:38 +02:00
ina209.c hwmon: Driver for Texas Instruments INA209 2013-02-06 09:57:59 -08:00
it87.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
jc42.c hwmon: (jc42) Add support for MCP98244 2013-02-06 09:58:07 -08:00
jz4740-hwmon.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00
k8temp.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
k10temp.c hwmon: (k10temp) Add support for F15h M60h 2015-06-02 11:42:53 +02:00
Kconfig hwmon: (k10temp) Add support for F15h M60h 2015-06-02 11:42:53 +02:00
lineage-pem.c hwmon: (lineage-pem) Add missing terminating entry for pem_[input|fan]_attributes 2013-03-14 06:55:21 -07:00
lm63.c hwmon: (lm63) Drop redundant safety on cache lifetime 2013-07-08 14:18:24 +02:00
lm70.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00
lm73.c hwmon: (lm73) Add support for max/min alarms 2013-02-06 09:57:58 -08:00
lm75.c hwmon: (lm75) Add support for the Dallas/Maxim DS7505 2013-05-04 14:49:36 +02:00
lm75.h hwmon: (lm75.h) Update header inclusion 2013-03-18 21:19:49 +01:00
lm77.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
lm78.c hwmon: (lm78) Fix overflow problems seen when writing large temperature limits 2014-09-03 21:31:20 +02:00
lm80.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
lm83.c hwmon: (lm83) Convert to use devm_ functions 2012-07-21 21:48:38 -07:00
lm85.c hwmon: (lm85) Fix various errors on attribute writes 2014-09-03 21:31:22 +02:00
lm87.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
lm90.c hwmon: (lm90) Fix max6696 alarm handling 2013-11-29 11:28:06 -08:00
lm92.c hwmon: Add missing inclusions of <linux/jiffies.h> 2012-10-10 15:25:56 +02:00
lm93.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
lm95234.c hwmon: Add driver for LM95234 2013-04-07 21:16:42 -07:00
lm95241.c hwmon: (lm95241) Convert to use devm_ functions 2012-09-23 21:08:31 -07:00
lm95245.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
ltc4151.c hwmon: (ltc4151) Fix 'Avoid unnecessary line continuations' checkpatch warning 2013-04-07 21:16:40 -07:00
ltc4215.c hwmon: (ltc4215) Fix 'Macros with complex values' checkpatch error 2013-04-07 21:16:40 -07:00
ltc4245.c hwmon: (ltc4245) Fix 'Macros with complex values' checkpatch error 2013-04-07 21:16:40 -07:00
ltc4261.c hwmon: (ltc4261) Fix 'Macros with complex values' checkpatch error 2013-04-07 21:16:40 -07:00
Makefile hwmon: (htu21) Add Measurement Specialties HTU21D support 2013-08-29 09:09:12 -07:00
max197.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
max1111.c hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated 2016-04-20 08:40:09 +02:00
max1619.c hwmon: Update Alexey Fisher's name 2012-10-10 15:25:56 +02:00
max1668.c hwmon: (max1668) Fix writing the minimum temperature 2014-03-05 17:13:50 +01:00
max6639.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
max6642.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
max6650.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
max6697.c hwmon: (max6697) fix MAX6581 ideality 2013-08-03 07:04:50 -07:00
max16065.c hwmon: Replace SENSORS_LIMIT with clamp_val 2013-01-25 21:03:54 -08:00
mc13783-adc.c hwmon: (mc13783-adc.c) use module_platform_driver_probe() 2013-04-07 21:16:37 -07:00
mcp3021.c hwmon: (mcp3021) Fix broken output scaling 2015-08-04 16:52:24 +02:00
nct6775.c hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips 2015-10-27 10:18:22 +01:00
ntc_thermistor.c hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE 2015-06-03 11:33:07 +02:00
pc87360.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
pc87427.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
pcf8591.c hwmon: (pcf8591) Convert to use devm_ functions 2012-07-21 21:48:41 -07:00
s3c-hwmon.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
sch56xx-common.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
sch56xx-common.h watchdog: sch56xx: Use watchdog core 2012-05-30 07:55:38 +02:00
sch5627.c hwmon: remove use of __devinit 2012-11-28 11:49:40 -08:00
sch5636.c hwmon: remove use of __devinit 2012-11-28 11:49:40 -08:00
sht15.c New driver for HTU21D (humidity sensor) 2013-09-03 10:43:35 -07:00
sht21.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00
sis5595.c hwmon: (sis5595) Prevent overflow problem when writing large limits 2014-09-03 21:31:19 +02:00
smm665.c hwmon: Add missing inclusions of <linux/jiffies.h> 2012-10-10 15:25:56 +02:00
smsc47b397.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00
smsc47m1.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
smsc47m192.c hwmon: (smsc47m192) Fix temperature limit and vrm write operations 2014-07-30 18:02:41 +02:00
thmc50.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
tmp102.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
tmp401.c hwmon: (tmp401) Drop redundant safety on cache lifetime 2013-05-19 08:19:29 -07:00
tmp421.c hwmon: (tmp421) Fix return value 2013-09-11 13:01:41 -07:00
twl4030-madc-hwmon.c hwmon: (twl4030-madc-hwmon) Fix warning message caused by removal of __devexit 2012-12-16 18:21:33 -08:00
ultra45_env.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00
vexpress.c hwmon: (vexpress) Fix build error seen if CONFIG_OF_DEVICE is not set 2013-01-09 21:47:22 -08:00
via-cputemp.c hwmon: delete __cpuinit usage from all hwmon files 2013-07-14 19:36:57 -04:00
via686a.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
vt1211.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
vt8231.c hwmon: Prevent some divide by zeros in FAN_TO_REG() 2013-12-20 07:48:52 -08:00
w83l785ts.c hwmon: (w83l785ts) Convert to use devm_ functions 2012-07-21 21:48:43 -07:00
w83l786ng.c hwmon: (w83l768ng) Fix fan speed control range 2013-12-20 07:48:53 -08:00
w83627ehf.c hwmon: (w83627ehf) Add support for hibernate 2013-08-11 22:10:40 -07:00
w83627hf.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
w83781d.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83791d.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83792d.c hwmon: (w83792d) Update module author 2013-09-06 14:05:42 +02:00
w83793.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
w83795.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
wm831x-hwmon.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00
wm8350-hwmon.c hwmon: remove use of __devexit 2012-11-28 11:50:34 -08:00