lkml.org 
[lkml]   [2012]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] leds: [trivial]Remove unnecesary return
Date
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>
---

Tested by build with the gcc linaro (arm-linux-gnueabihf) (4.7.1).

drivers/leds/leds-s3c24xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index bd0a5ed..e6ee105 100644
--- a/drivers/leds/leds-s3c24xx.c
+++ b/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 = {
--
1.7.9.5


\
 
 \ /
  Last update: 2012-06-19 21:21    [W:0.113 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site