diff options
author | Curt Brune <curt@cumulusnetworks.com> | 2013-08-08 12:11:03 -0700 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-09-10 01:57:21 +0100 |
commit | c2d9f22ac7b0b4434df8cd12b6f857647d35c3b1 (patch) | |
tree | 31aa5f2c02d0028e90bc074de603155c374a8f8e /drivers/net/wireless/hostap/hostap_ioctl.c | |
parent | d03160d52da816b9f6c87d68bed5aeecaf488191 (diff) |
hwmon: (adt7470) Fix incorrect return code check
commit 93d783bcca69bfacc8dc739d8a050498402587b5 upstream.
In adt7470_write_word_data(), which writes two bytes using
i2c_smbus_write_byte_data(), the return codes are incorrectly AND-ed
together when they should be OR-ed together.
The return code of i2c_smbus_write_byte_data() is zero for success.
The upshot is only the first byte was ever written to the hardware.
The 2nd byte was never written out.
I noticed that trying to set the fan speed limits was not working
correctly on my system. Setting the fan speed limits is the only
code that uses adt7470_write_word_data(). After making the change
the limit settings work and the alarms work also.
Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_ioctl.c')
0 files changed, 0 insertions, 0 deletions