Commit fdafa7cf authored by Linus Torvalds's avatar Linus Torvalds

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 bug in adt7470 driver which causes it to fail writing fan speed
  limits"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (adt7470) Fix incorrect return code check
parents 79a6fb1a 93d783bc
...@@ -215,7 +215,7 @@ static inline int adt7470_write_word_data(struct i2c_client *client, u8 reg, ...@@ -215,7 +215,7 @@ static inline int adt7470_write_word_data(struct i2c_client *client, u8 reg,
u16 value) u16 value)
{ {
return i2c_smbus_write_byte_data(client, reg, value & 0xFF) return i2c_smbus_write_byte_data(client, reg, value & 0xFF)
&& i2c_smbus_write_byte_data(client, reg + 1, value >> 8); || i2c_smbus_write_byte_data(client, reg + 1, value >> 8);
} }
static void adt7470_init_client(struct i2c_client *client) static void adt7470_init_client(struct i2c_client *client)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment