From f34e5e639621325a537c632cf1c1444c0c9b1d6a Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 15 Feb 2012 23:12:17 -0800 Subject: [PATCH] --- yaml --- r: 292029 b: refs/heads/master c: b9e0348f2051358318e5ef0fd5b91c4d335a370d h: refs/heads/master i: 292027: 9c717929d760c09b7e63151e0fb9f7fb8b642d8e v: v3 --- [refs] | 2 +- trunk/drivers/regulator/wm8994-regulator.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 32e6c1d80ca8..af79507519c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 46783a046e13588f0459271ad6db9785fa8dcb8b +refs/heads/master: b9e0348f2051358318e5ef0fd5b91c4d335a370d diff --git a/trunk/drivers/regulator/wm8994-regulator.c b/trunk/drivers/regulator/wm8994-regulator.c index 435e335d6e67..75ed402d9f43 100644 --- a/trunk/drivers/regulator/wm8994-regulator.c +++ b/trunk/drivers/regulator/wm8994-regulator.c @@ -241,7 +241,7 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev) if (!pdata) return -ENODEV; - ldo = kzalloc(sizeof(struct wm8994_ldo), GFP_KERNEL); + ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm8994_ldo), GFP_KERNEL); if (ldo == NULL) { dev_err(&pdev->dev, "Unable to allocate private data\n"); return -ENOMEM; @@ -285,7 +285,6 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev) if (gpio_is_valid(ldo->enable)) gpio_free(ldo->enable); err: - kfree(ldo); return ret; } @@ -298,7 +297,6 @@ static __devexit int wm8994_ldo_remove(struct platform_device *pdev) regulator_unregister(ldo->regulator); if (gpio_is_valid(ldo->enable)) gpio_free(ldo->enable); - kfree(ldo); return 0; }