diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-01 16:49:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-01 16:49:13 -0400 |
commit | 2790aed095fe50b21ab7ed94dc34a0f410a3872c (patch) | |
tree | 842f28c60c19d52029b71d9b623393b2057b7c34 /drivers/hwmon/lm75.c | |
parent | f38d2e5313f0af9d9b66c02a5d49c71deb994b85 (diff) | |
parent | 601807bbb7b422012492611b283bdf3647d3742c (diff) | |
download | linux-2790aed095fe50b21ab7ed94dc34a0f410a3872c.tar.bz2 |
Merge tag 'hwmon-for-linus-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull more hwmon updates from Guenter Roeck:
- Improved error handling in tmp102, lm75, and lm90 drivers
- Bug fixes in sht3x, ftsteutates, iio_hwmon, and adt7411 drivers
* tag 'hwmon-for-linus-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (adt7411) set sane values for CFG1 and CFG3
hwmon: (iio_hwmon) fix memory leak in name attribute
hwmon: (ftsteutates) Fix potential memory access error
hwmon: (tmp102) Improve error handling
hwmon: (lm75) Improve error handling
hwmon: (lm90) Improve error handling
hwmon: (lm90) Add missing assignment
hwmon: (sht3x) set initial jiffies to last_update
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r-- | drivers/hwmon/lm75.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index 547a9c87c68c..92f9d4bbf597 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -220,7 +220,7 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id) struct device *dev = &client->dev; struct device *hwmon_dev; struct lm75_data *data; - int status; + int status, err; u8 set_mask, clr_mask; int new; enum lm75_type kind = id->driver_data; @@ -331,7 +331,9 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id) if (status != new) i2c_smbus_write_byte_data(client, LM75_REG_CONF, new); - devm_add_action(dev, lm75_remove, data); + err = devm_add_action_or_reset(dev, lm75_remove, data); + if (err) + return err; dev_dbg(dev, "Config %02x\n", new); |