Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302133
b: refs/heads/master
c: 0df8c96
h: refs/heads/master
i:
  302131: c11dff1
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Apr 1, 2012
1 parent 1dd7907 commit dc3ff89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 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: 935c14a216c1afa855678e200607e98cc8cc2c51
refs/heads/master: 0df8c96fa1c1adb23c49124685dde77b6560bef2
5 changes: 1 addition & 4 deletions trunk/drivers/regulator/ad5398.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static int __devinit ad5398_probe(struct i2c_client *client,
if (!init_data)
return -EINVAL;

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

Expand All @@ -246,7 +246,6 @@ static int __devinit ad5398_probe(struct i2c_client *client,
return 0;

err:
kfree(chip);
return ret;
}

Expand All @@ -255,8 +254,6 @@ static int __devexit ad5398_remove(struct i2c_client *client)
struct ad5398_chip_info *chip = i2c_get_clientdata(client);

regulator_unregister(chip->rdev);
kfree(chip);

return 0;
}

Expand Down

0 comments on commit dc3ff89

Please sign in to comment.