Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326185
b: refs/heads/master
c: 816864d
h: refs/heads/master
i:
  326183: 1e52aca
v: v3
  • Loading branch information
Guenter Roeck committed Sep 24, 2012
1 parent 3deb836 commit 31abd17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 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: 7711f1bd039233464dbde346f4a14a4bb874f77f
refs/heads/master: 816864d9968814c23c12e6601ad7dd1dabb8f994
13 changes: 4 additions & 9 deletions trunk/drivers/hwmon/w83l786ng.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,10 @@ w83l786ng_probe(struct i2c_client *client, const struct i2c_device_id *id)
int i, err = 0;
u8 reg_tmp;

data = kzalloc(sizeof(struct w83l786ng_data), GFP_KERNEL);
if (!data) {
err = -ENOMEM;
goto exit;
}
data = devm_kzalloc(&client->dev, sizeof(struct w83l786ng_data),
GFP_KERNEL);
if (!data)
return -ENOMEM;

i2c_set_clientdata(client, data);
mutex_init(&data->update_lock);
Expand Down Expand Up @@ -708,8 +707,6 @@ w83l786ng_probe(struct i2c_client *client, const struct i2c_device_id *id)

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

Expand All @@ -721,8 +718,6 @@ w83l786ng_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &w83l786ng_group);

kfree(data);

return 0;
}

Expand Down

0 comments on commit 31abd17

Please sign in to comment.