diff options
author | Jeff Garzik <jeff@garzik.org> | 2012-07-25 19:58:48 (GMT) |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-07-25 19:58:48 (GMT) |
commit | 8407884dd9164ec18ed2afc00f56b87e36c51fcf (patch) | |
tree | b6ea42c231d7d39f454de28a068d78ce11709770 /drivers/hwmon/lm87.c | |
parent | dc7f71f486f4f5fa96f6dcf86833da020cde8a11 (diff) | |
parent | bdc0077af574800d24318b6945cf2344e8dbb050 (diff) | |
download | linux-8407884dd9164ec18ed2afc00f56b87e36c51fcf.tar.xz |
Merge branch 'master' [vanilla Linus master] into libata-dev.git/upstream
Two bits were appended to the end of the bitfield
list in struct scsi_device. Resolve that conflict
by including both bits.
Conflicts:
include/scsi/scsi_device.h
Diffstat (limited to 'drivers/hwmon/lm87.c')
-rw-r--r-- | drivers/hwmon/lm87.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c index 314d147..16e45d7 100644 --- a/drivers/hwmon/lm87.c +++ b/drivers/hwmon/lm87.c @@ -898,11 +898,9 @@ static int lm87_probe(struct i2c_client *client, const struct i2c_device_id *id) struct lm87_data *data; int err; - data = kzalloc(sizeof(struct lm87_data), GFP_KERNEL); - if (!data) { - err = -ENOMEM; - goto exit; - } + data = devm_kzalloc(&client->dev, sizeof(struct lm87_data), GFP_KERNEL); + if (!data) + return -ENOMEM; i2c_set_clientdata(client, data); data->valid = 0; @@ -923,7 +921,7 @@ static int lm87_probe(struct i2c_client *client, const struct i2c_device_id *id) /* Register sysfs hooks */ err = sysfs_create_group(&client->dev.kobj, &lm87_group); if (err) - goto exit_free; + goto exit_stop; if (data->channel & CHAN_NO_FAN(0)) { err = sysfs_create_group(&client->dev.kobj, &lm87_group_in6); @@ -972,10 +970,8 @@ static int lm87_probe(struct i2c_client *client, const struct i2c_device_id *id) exit_remove: lm87_remove_files(client); -exit_free: +exit_stop: lm87_write_value(client, LM87_REG_CONFIG, data->config); - kfree(data); -exit: return err; } @@ -987,7 +983,6 @@ static int lm87_remove(struct i2c_client *client) lm87_remove_files(client); lm87_write_value(client, LM87_REG_CONFIG, data->config); - kfree(data); return 0; } |