Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302147
b: refs/heads/master
c: 02b5521
h: refs/heads/master
i:
  302145: 10e2e59
  302143: 04905db
v: v3
  • Loading branch information
Mark Brown committed Apr 4, 2012
1 parent fd0274f commit 2e8996b
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: 69d715a142f393bbcf1c05b440c074bed2aa0416
refs/heads/master: 02b552160f955a6dd6a54600f262365dc8916d69
5 changes: 2 additions & 3 deletions trunk/drivers/regulator/gpio-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev)
struct gpio_regulator_data *drvdata;
int ptr, ret, state;

drvdata = kzalloc(sizeof(struct gpio_regulator_data), GFP_KERNEL);
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gpio_regulator_data),
GFP_KERNEL);
if (drvdata == NULL) {
dev_err(&pdev->dev, "Failed to allocate device data\n");
return -ENOMEM;
Expand Down Expand Up @@ -307,7 +308,6 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev)
err_name:
kfree(drvdata->desc.name);
err:
kfree(drvdata);
return ret;
}

Expand All @@ -326,7 +326,6 @@ static int __devexit gpio_regulator_remove(struct platform_device *pdev)
gpio_free(drvdata->enable_gpio);

kfree(drvdata->desc.name);
kfree(drvdata);

return 0;
}
Expand Down

0 comments on commit 2e8996b

Please sign in to comment.