From: Zhenwen Xu Date: Fri, 3 Apr 2009 14:35:52 +0000 (+0100) Subject: leds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c X-Git-Tag: v2.6.30-rc1~187^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bfb2cc48f077017f6224e725886d07d76e3f96db;p=karo-tx-linux.git leds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c This goto is unnecessary. Signed-off-by: Zhenwen Xu Signed-off-by: Andrew Morton Signed-off-by: Richard Purdie --- 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) 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 = {