Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326170
b: refs/heads/master
c: 05639bc
h: refs/heads/master
v: v3
  • Loading branch information
Guenter Roeck committed Sep 24, 2012
1 parent c9d1eec commit 794f972
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: 33cd66e3c8048f03b9cc107b7a21c29cfd700ab7
refs/heads/master: 05639bcb4b0d509090026e836addaa3b28a14d14
8 changes: 3 additions & 5 deletions trunk/drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,8 @@ static int f75375_probe(struct i2c_client *client,
if (!i2c_check_functionality(client->adapter,
I2C_FUNC_SMBUS_BYTE_DATA))
return -EIO;
data = kzalloc(sizeof(struct f75375_data), GFP_KERNEL);
data = devm_kzalloc(&client->dev, sizeof(struct f75375_data),
GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand All @@ -848,7 +849,7 @@ static int f75375_probe(struct i2c_client *client,

err = sysfs_create_group(&client->dev.kobj, &f75375_group);
if (err)
goto exit_free;
return err;

if (data->kind != f75373) {
err = sysfs_chmod_file(&client->dev.kobj,
Expand All @@ -875,8 +876,6 @@ static int f75375_probe(struct i2c_client *client,

exit_remove:
sysfs_remove_group(&client->dev.kobj, &f75375_group);
exit_free:
kfree(data);
return err;
}

Expand All @@ -885,7 +884,6 @@ static int f75375_remove(struct i2c_client *client)
struct f75375_data *data = i2c_get_clientdata(client);
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &f75375_group);
kfree(data);
return 0;
}

Expand Down

0 comments on commit 794f972

Please sign in to comment.