leds: [trivial]Remove unnecesary return
authorDevendra Naga <devendra.aaru@gmail.com>
Tue, 19 Jun 2012 18:22:39 +0000 (02:22 +0800)
committerBryan Wu <bryan.wu@canonical.com>
Mon, 23 Jul 2012 23:52:35 +0000 (07:52 +0800)
the ret is got the status returned by the
led_classdev_register, returning ret if the
led_classdev_register fails and returning 0
if the led_classdev_register success, can be done
by doing just "return ret" at the end.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
drivers/leds/leds-s3c24xx.c

index bd0a5ed49c42d9473bf1fa2e735500ee8c2f67ad..e6ee1054826576428f3bf3928ba043a1490bce7e 100644 (file)
@@ -106,10 +106,9 @@ static int s3c24xx_led_probe(struct platform_device *dev)
        if (ret < 0) {
                dev_err(&dev->dev, "led_classdev_register failed\n");
                kfree(led);
-               return ret;
        }
 
-       return 0;
+       return ret;
 }
 
 static struct platform_driver s3c24xx_led_driver = {