Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350608
b: refs/heads/master
c: 00edfc6
h: refs/heads/master
v: v3
  • Loading branch information
Devendra Naga authored and Anton Vorontsov committed Jan 6, 2013
1 parent c95ecf7 commit 4a3edaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 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: d5c2b14cb2b9b6a099e22f39ae2196a8403994e9
refs/heads/master: 00edfc65c2ce7d039ea45f1b3cc120db01ddcce9
4 changes: 1 addition & 3 deletions trunk/drivers/power/max17040_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int max17040_probe(struct i2c_client *client,
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))
return -EIO;

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

Expand All @@ -225,7 +225,6 @@ static int max17040_probe(struct i2c_client *client,
ret = power_supply_register(&client->dev, &chip->battery);
if (ret) {
dev_err(&client->dev, "failed: power supply register\n");
kfree(chip);
return ret;
}

Expand All @@ -244,7 +243,6 @@ static int max17040_remove(struct i2c_client *client)

power_supply_unregister(&chip->battery);
cancel_delayed_work(&chip->work);
kfree(chip);
return 0;
}

Expand Down

0 comments on commit 4a3edaa

Please sign in to comment.