Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318445
b: refs/heads/master
c: f8d203c
h: refs/heads/master
i:
  318443: ddc7c49
v: v3
  • Loading branch information
Mark Brown authored and Linus Walleij committed Jul 12, 2012
1 parent da6732a commit 6e0457a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: 224a1f90458b5005fa7aec5e8a6d64fd8eccb208
refs/heads/master: f8d203c049af2faaa4a23e51e1626b7660b33d8e
11 changes: 3 additions & 8 deletions trunk/drivers/gpio/gpio-wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ static int __devinit wm8994_gpio_probe(struct platform_device *pdev)
struct wm8994_gpio *wm8994_gpio;
int ret;

wm8994_gpio = kzalloc(sizeof(*wm8994_gpio), GFP_KERNEL);
wm8994_gpio = devm_kzalloc(&pdev->dev, sizeof(*wm8994_gpio),
GFP_KERNEL);
if (wm8994_gpio == NULL)
return -ENOMEM;

Expand All @@ -274,20 +275,14 @@ static int __devinit wm8994_gpio_probe(struct platform_device *pdev)
return ret;

err:
kfree(wm8994_gpio);
return ret;
}

static int __devexit wm8994_gpio_remove(struct platform_device *pdev)
{
struct wm8994_gpio *wm8994_gpio = platform_get_drvdata(pdev);
int ret;

ret = gpiochip_remove(&wm8994_gpio->gpio_chip);
if (ret == 0)
kfree(wm8994_gpio);

return ret;
return gpiochip_remove(&wm8994_gpio->gpio_chip);
}

static struct platform_driver wm8994_gpio_driver = {
Expand Down

0 comments on commit 6e0457a

Please sign in to comment.