]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/hwmon/adt7470.c
hwmon: (adt7470) Fix incorrect return code check
[linux-imx.git] / drivers / hwmon / adt7470.c
index b83bf4bb95eba3489e861d7f2d51e24e6a42d15f..6099f50b28aaa80f74e9ac69373f73efe4e852f1 100644 (file)
@@ -215,7 +215,7 @@ static inline int adt7470_write_word_data(struct i2c_client *client, u8 reg,
                                          u16 value)
 {
        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)
@@ -1285,7 +1285,7 @@ static int adt7470_probe(struct i2c_client *client,
        }
 
        init_completion(&data->auto_update_stop);
-       data->auto_update = kthread_run(adt7470_update_thread, client,
+       data->auto_update = kthread_run(adt7470_update_thread, client, "%s",
                                        dev_name(data->hwmon_dev));
        if (IS_ERR(data->auto_update)) {
                err = PTR_ERR(data->auto_update);