diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 20:48:31 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 20:48:31 +0400 |
commit | c87985a3ce723995fc7b25e598238d67154108a1 (patch) | |
tree | e60def1b77c25c1d74180f62e8a5603f9826f209 /drivers/hwmon/max6650.c | |
parent | d155255a344c417acad74156654295a2964e6b81 (diff) | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) | |
download | linux-c87985a3ce723995fc7b25e598238d67154108a1.tar.xz |
Merge tty-next into 3.6-rc1
This handles the merge issue in:
arch/um/drivers/line.c
arch/um/drivers/line.h
And resolves the duplicate patches that were in both trees do to the
tty-next branch not getting merged into 3.6-rc1.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon/max6650.c')
-rw-r--r-- | drivers/hwmon/max6650.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index 33a8a7f15e18..f739f83bafb9 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c @@ -545,7 +545,8 @@ static int max6650_probe(struct i2c_client *client, struct max6650_data *data; int err; - data = kzalloc(sizeof(struct max6650_data), GFP_KERNEL); + data = devm_kzalloc(&client->dev, sizeof(struct max6650_data), + GFP_KERNEL); if (!data) { dev_err(&client->dev, "out of memory.\n"); return -ENOMEM; @@ -560,11 +561,11 @@ static int max6650_probe(struct i2c_client *client, */ err = max6650_init_client(client); if (err) - goto err_free; + return err; err = sysfs_create_group(&client->dev.kobj, &max6650_attr_grp); if (err) - goto err_free; + return err; /* 3 additional fan inputs for the MAX6651 */ if (data->nr_fans == 4) { err = sysfs_create_group(&client->dev.kobj, &max6651_attr_grp); @@ -582,8 +583,6 @@ static int max6650_probe(struct i2c_client *client, sysfs_remove_group(&client->dev.kobj, &max6651_attr_grp); err_remove: sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp); -err_free: - kfree(data); return err; } @@ -595,7 +594,6 @@ static int max6650_remove(struct i2c_client *client) if (data->nr_fans == 4) sysfs_remove_group(&client->dev.kobj, &max6651_attr_grp); sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp); - kfree(data); return 0; } |