Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302118
b: refs/heads/master
c: 4c60165
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Apr 1, 2012
1 parent 4ca3a73 commit 8fb28ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 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: 3cbff37ea0e9d90334c51ac92f5a597697258d3d
refs/heads/master: 4c60165dcb68f56e97b0a1b8f5233b3a486af353
9 changes: 2 additions & 7 deletions trunk/drivers/regulator/wm831x-dcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ static __devinit int wm831x_boostp_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->dcdc[id] == NULL)
return -ENODEV;

dcdc = kzalloc(sizeof(struct wm831x_dcdc), GFP_KERNEL);
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
if (dcdc == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -897,7 +897,6 @@ static __devinit int wm831x_boostp_probe(struct platform_device *pdev)
err_regulator:
regulator_unregister(dcdc->regulator);
err:
kfree(dcdc);
return ret;
}

Expand All @@ -909,7 +908,6 @@ static __devexit int wm831x_boostp_remove(struct platform_device *pdev)

free_irq(platform_get_irq_byname(pdev, "UV"), dcdc);
regulator_unregister(dcdc->regulator);
kfree(dcdc);

return 0;
}
Expand Down Expand Up @@ -952,7 +950,7 @@ static __devinit int wm831x_epe_probe(struct platform_device *pdev)
if (pdata == NULL || pdata->epe[id] == NULL)
return -ENODEV;

dcdc = kzalloc(sizeof(struct wm831x_dcdc), GFP_KERNEL);
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
if (dcdc == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -984,7 +982,6 @@ static __devinit int wm831x_epe_probe(struct platform_device *pdev)
return 0;

err:
kfree(dcdc);
return ret;
}

Expand All @@ -993,9 +990,7 @@ static __devexit int wm831x_epe_remove(struct platform_device *pdev)
struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev);

platform_set_drvdata(pdev, NULL);

regulator_unregister(dcdc->regulator);
kfree(dcdc);

return 0;
}
Expand Down

0 comments on commit 8fb28ba

Please sign in to comment.