Explorar o código

leds: [trivial]Remove unnecesary return

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>
Devendra Naga %!s(int64=13) %!d(string=hai) anos
pai
achega
1522d02e27
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      drivers/leds/leds-s3c24xx.c

+ 1 - 2
drivers/leds/leds-s3c24xx.c

@@ -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 = {