diff options
-rw-r--r-- | drivers/leds/leds-s3c24xx.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index 4d81131542a..aa2e7ae0cda 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) ret = led_classdev_register(&dev->dev, &led->cdev); if (ret < 0) { dev_err(&dev->dev, "led_classdev_register failed\n"); - goto exit_err1; + kfree(led); + return ret; } return 0; - - exit_err1: - kfree(led); - return ret; } static struct platform_driver s3c24xx_led_driver = { |