Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326175
b: refs/heads/master
c: 7008b97
h: refs/heads/master
i:
  326173: 200e691
  326171: 1f9b9e4
  326167: 925b012
  326159: 62891ce
  326143: 789f872
v: v3
  • Loading branch information
Guenter Roeck committed Sep 24, 2012
1 parent 55c0dd4 commit 75152c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a8dd946c420781fd7a70fec8b75e0daf67c4a681
refs/heads/master: 7008b9704ada3d7483358da7a3c7c640e1e0be17
8 changes: 3 additions & 5 deletions trunk/drivers/hwmon/max1668.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ static int max1668_probe(struct i2c_client *client,
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
return -ENODEV;

data = kzalloc(sizeof(struct max1668_data), GFP_KERNEL);
data = devm_kzalloc(&client->dev, sizeof(struct max1668_data),
GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand All @@ -422,7 +423,7 @@ static int max1668_probe(struct i2c_client *client,
/* Register sysfs hooks */
err = sysfs_create_group(&client->dev.kobj, &max1668_group_common);
if (err)
goto error_free;
return err;

if (data->type == max1668 || data->type == max1989) {
err = sysfs_create_group(&client->dev.kobj,
Expand All @@ -444,8 +445,6 @@ static int max1668_probe(struct i2c_client *client,
sysfs_remove_group(&client->dev.kobj, &max1668_group_unique);
error_sysrem0:
sysfs_remove_group(&client->dev.kobj, &max1668_group_common);
error_free:
kfree(data);
return err;
}

Expand All @@ -459,7 +458,6 @@ static int max1668_remove(struct i2c_client *client)

sysfs_remove_group(&client->dev.kobj, &max1668_group_common);

kfree(data);
return 0;
}

Expand Down

0 comments on commit 75152c3

Please sign in to comment.