Commit fdafa7cf97a3c4c1d731600b94241cb9cea40fc8

Authored by 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

Showing 1 changed file Side-by-side Diff

drivers/hwmon/adt7470.c
... ... @@ -215,7 +215,7 @@
215 215 u16 value)
216 216 {
217 217 return i2c_smbus_write_byte_data(client, reg, value & 0xFF)
218   - && i2c_smbus_write_byte_data(client, reg + 1, value >> 8);
  218 + || i2c_smbus_write_byte_data(client, reg + 1, value >> 8);
219 219 }
220 220  
221 221 static void adt7470_init_client(struct i2c_client *client)