Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302110
b: refs/heads/master
c: c45bb35
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Apr 1, 2012
1 parent 5ea229a commit dd8a7cf
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: 33426e97968113d5421acc82b494d8a035ca4331
refs/heads/master: c45bb35f8b76439f4b6c0efaca510f871e9b1840
5 changes: 2 additions & 3 deletions trunk/drivers/regulator/fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
if (!config)
return -ENOMEM;

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

Expand All @@ -282,7 +282,6 @@ static int __devexit reg_fixed_voltage_remove(struct platform_device *pdev)
if (gpio_is_valid(drvdata->gpio))
gpio_free(drvdata->gpio);
kfree(drvdata->desc.name);
kfree(drvdata);

return 0;
}
Expand Down

0 comments on commit dd8a7cf

Please sign in to comment.