Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315973
b: refs/heads/master
c: e3ecb2e
h: refs/heads/master
i:
  315971: 3f5daca
v: v3
  • Loading branch information
Guenter Roeck committed Jul 22, 2012
1 parent 92c44fc commit 619b26d
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 6702c9981e92aeb5cbfc192d23c11ef0f26b6157
refs/heads/master: e3ecb2eeedfc7b2c6b9f0d2db194eb43f34b688f
7 changes: 2 additions & 5 deletions trunk/drivers/hwmon/adt7475.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ static int adt7475_probe(struct i2c_client *client,
int i, ret = 0, revision;
u8 config2, config3;

data = kzalloc(sizeof(*data), GFP_KERNEL);
data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
if (data == NULL)
return -ENOMEM;

Expand Down Expand Up @@ -1344,7 +1344,7 @@ static int adt7475_probe(struct i2c_client *client,

ret = sysfs_create_group(&client->dev.kobj, &adt7475_attr_group);
if (ret)
goto efree;
return ret;

/* Features that can be disabled individually */
if (data->has_fan4) {
Expand Down Expand Up @@ -1410,8 +1410,6 @@ static int adt7475_probe(struct i2c_client *client,

eremove:
adt7475_remove_files(client, data);
efree:
kfree(data);
return ret;
}

Expand All @@ -1421,7 +1419,6 @@ static int adt7475_remove(struct i2c_client *client)

hwmon_device_unregister(data->hwmon_dev);
adt7475_remove_files(client, data);
kfree(data);

return 0;
}
Expand Down

0 comments on commit 619b26d

Please sign in to comment.