From: Devendra Naga <devendra.aaru@gmail.com>
To: Bryan Wu <bryan.wu@canonical.com>,
Richard Purdie <rpurdie@rpsys.net>,
Jiri Kosina <trivial@kernel.org>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Devendra Naga <devendra.aaru@gmail.com>
Subject: [PATCH] leds: [trivial]Remove unnecesary return
Date: Tue, 19 Jun 2012 23:52:39 +0530 [thread overview]
Message-ID: <1340130159-10408-1-git-send-email-devendra.aaru@gmail.com> (raw)
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
next reply other threads:[~2012-06-19 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 18:22 Devendra Naga [this message]
2012-06-20 5:24 ` Bryan Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340130159-10408-1-git-send-email-devendra.aaru@gmail.com \
--to=devendra.aaru@gmail.com \
--cc=bryan.wu@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®