Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283065
b: refs/heads/master
c: c957b61
h: refs/heads/master
i:
  283063: 47a1ab4
v: v3
  • Loading branch information
Mark Brown authored and Linus Torvalds committed Jan 11, 2012
1 parent aa101a8 commit d708a03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: 1713cb9d6069fac581fcea928f65ca6ca7c9facf
refs/heads/master: c957b614bde8539416dcde8d702370ff30b1c662
7 changes: 2 additions & 5 deletions trunk/drivers/leds/leds-wm8350.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static int wm8350_led_probe(struct platform_device *pdev)
goto err_isink;
}

led = kzalloc(sizeof(*led), GFP_KERNEL);
led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL);
if (led == NULL) {
ret = -ENOMEM;
goto err_dcdc;
Expand Down Expand Up @@ -259,12 +259,10 @@ static int wm8350_led_probe(struct platform_device *pdev)

ret = led_classdev_register(&pdev->dev, &led->cdev);
if (ret < 0)
goto err_led;
goto err_dcdc;

return 0;

err_led:
kfree(led);
err_dcdc:
regulator_put(dcdc);
err_isink:
Expand All @@ -281,7 +279,6 @@ static int wm8350_led_remove(struct platform_device *pdev)
wm8350_led_disable(led);
regulator_put(led->dcdc);
regulator_put(led->isink);
kfree(led);
return 0;
}

Expand Down

0 comments on commit d708a03

Please sign in to comment.