Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367518
b: refs/heads/master
c: b92ff85
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Anton Vorontsov committed Apr 1, 2013
1 parent c3fe443 commit 7d95c7f
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 2a2ce52a4006db6c7831f1b21f1b0cc892516e85
refs/heads/master: b92ff855b97795d8be3115c0aff04f6efb5a53aa
5 changes: 2 additions & 3 deletions trunk/drivers/power/gpio-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ static int gpio_charger_probe(struct platform_device *pdev)
return -EINVAL;
}

gpio_charger = kzalloc(sizeof(*gpio_charger), GFP_KERNEL);
gpio_charger = devm_kzalloc(&pdev->dev, sizeof(*gpio_charger),
GFP_KERNEL);
if (!gpio_charger) {
dev_err(&pdev->dev, "Failed to alloc driver structure\n");
return -ENOMEM;
Expand Down Expand Up @@ -140,7 +141,6 @@ static int gpio_charger_probe(struct platform_device *pdev)
err_gpio_free:
gpio_free(pdata->gpio);
err_free:
kfree(gpio_charger);
return ret;
}

Expand All @@ -156,7 +156,6 @@ static int gpio_charger_remove(struct platform_device *pdev)
gpio_free(gpio_charger->pdata->gpio);

platform_set_drvdata(pdev, NULL);
kfree(gpio_charger);

return 0;
}
Expand Down

0 comments on commit 7d95c7f

Please sign in to comment.