Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367519
b: refs/heads/master
c: 2cb1212
h: refs/heads/master
i:
  367517: c3fe443
  367515: a6a6255
  367511: 83e9cdd
  367503: ac9931b
  367487: 9186cc3
v: v3
  • Loading branch information
Jingoo Han authored and Anton Vorontsov committed Apr 1, 2013
1 parent 7d95c7f commit 09e8716
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: b92ff855b97795d8be3115c0aff04f6efb5a53aa
refs/heads/master: 2cb12122b8173e535619a833d5efc65cef718239
7 changes: 2 additions & 5 deletions trunk/drivers/power/ds2780_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static int ds2780_battery_probe(struct platform_device *pdev)
int ret = 0;
struct ds2780_device_info *dev_info;

dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
dev_info = devm_kzalloc(&pdev->dev, sizeof(*dev_info), GFP_KERNEL);
if (!dev_info) {
ret = -ENOMEM;
goto fail;
Expand All @@ -779,7 +779,7 @@ static int ds2780_battery_probe(struct platform_device *pdev)
ret = power_supply_register(&pdev->dev, &dev_info->bat);
if (ret) {
dev_err(dev_info->dev, "failed to register battery\n");
goto fail_free_info;
goto fail;
}

ret = sysfs_create_group(&dev_info->bat.dev->kobj, &ds2780_attr_group);
Expand Down Expand Up @@ -813,8 +813,6 @@ static int ds2780_battery_probe(struct platform_device *pdev)
sysfs_remove_group(&dev_info->bat.dev->kobj, &ds2780_attr_group);
fail_unregister:
power_supply_unregister(&dev_info->bat);
fail_free_info:
kfree(dev_info);
fail:
return ret;
}
Expand All @@ -828,7 +826,6 @@ static int ds2780_battery_remove(struct platform_device *pdev)

power_supply_unregister(&dev_info->bat);

kfree(dev_info);
return 0;
}

Expand Down

0 comments on commit 09e8716

Please sign in to comment.