Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318975
b: refs/heads/master
c: 7e97b58
h: refs/heads/master
i:
  318973: b7c590a
  318971: bcdc894
  318967: 109bc5d
  318959: e7d441b
  318943: 99ec5ce
  318911: 36ce32c
  318847: 3f1e945
  318719: e36cabd
  318463: ce95fe4
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Bryan Wu committed Jul 23, 2012
1 parent bed991b commit 43082f8
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 317dfb148d606a92e7d2748ab77f3d8f9749cc8a
refs/heads/master: 7e97b58133b7cddf3be80660300bb2c77c514c6f
8 changes: 3 additions & 5 deletions trunk/drivers/leds/leds-s3c24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ static int s3c24xx_led_remove(struct platform_device *dev)
struct s3c24xx_gpio_led *led = pdev_to_gpio(dev);

led_classdev_unregister(&led->cdev);
kfree(led);

return 0;
}
Expand All @@ -74,7 +73,8 @@ static int s3c24xx_led_probe(struct platform_device *dev)
struct s3c24xx_gpio_led *led;
int ret;

led = kzalloc(sizeof(struct s3c24xx_gpio_led), GFP_KERNEL);
led = devm_kzalloc(&dev->dev, sizeof(struct s3c24xx_gpio_led),
GFP_KERNEL);
if (led == NULL) {
dev_err(&dev->dev, "No memory for device\n");
return -ENOMEM;
Expand Down Expand Up @@ -103,10 +103,8 @@ static int s3c24xx_led_probe(struct platform_device *dev)
/* register our new led device */

ret = led_classdev_register(&dev->dev, &led->cdev);
if (ret < 0) {
if (ret < 0)
dev_err(&dev->dev, "led_classdev_register failed\n");
kfree(led);
}

return ret;
}
Expand Down

0 comments on commit 43082f8

Please sign in to comment.