hwmon: (it87) Ensure that pwm control cache is current before updating values
authorGuenter Roeck <linux@roeck-us.net>
Wed, 8 Feb 2017 22:02:59 +0000 (14:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 05:41:42 +0000 (06:41 +0100)
commit6c95eba9ca104fad6abd758c58b3ac55c44f627d
tree9d29c8f4a5c528ef568d2ce954bf565c2509a841
parent4401e4779e2e6edea43f80ba1dc8e25e9bec7abd
hwmon: (it87) Ensure that pwm control cache is current before updating values

commit 82dbe987b70042b340f851bdc969a971081e5f02 upstream.

If sensor attributes were never read, the pwm control data has not been
initiialized, which can cause wrong driver behavior. Ensure that cached
data is current before acting on it.

Reported-by: Kevin Folz <kfolz@evertz.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/it87.c