aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/leds/leds-s3c24xx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index 4d81131542ae..aa2e7ae0cdae 100644
--- a/drivers/leds/leds-s3c24xx.c
+++ b/drivers/leds/leds-s3c24xx.c
@@ -102,14 +102,11 @@ static int s3c24xx_led_probe(struct platform_device *dev)
102 ret = led_classdev_register(&dev->dev, &led->cdev); 102 ret = led_classdev_register(&dev->dev, &led->cdev);
103 if (ret < 0) { 103 if (ret < 0) {
104 dev_err(&dev->dev, "led_classdev_register failed\n"); 104 dev_err(&dev->dev, "led_classdev_register failed\n");
105 goto exit_err1; 105 kfree(led);
106 return ret;
106 } 107 }
107 108
108 return 0; 109 return 0;
109
110 exit_err1:
111 kfree(led);
112 return ret;
113} 110}
114 111
115static struct platform_driver s3c24xx_led_driver = { 112static struct platform_driver s3c24xx_led_driver = {