* [PATCH]remove a unnecessary "goto" on drivers/leds/leds-s3c24.c
@ 2009-03-04 12:11 Zhenwen Xu
0 siblings, 0 replies; only message in thread
From: Zhenwen Xu @ 2009-03-04 12:11 UTC (permalink / raw)
To: Russell King; +Cc: Andrew Morton, linux-kernel
remove a unnecessary goto on drivers/leds/leds-s3c24xx.c.
This goto is unnecessary.
--
---------------------------------
Zhenwen Xu - Open and Free
Home Page: http://zhwen.org
My Studio: http://dim4.cn
>From d5a6f29599d0dc94a6eda203414fb5d6ad99c68d Mon Sep 17 00:00:00 2001
From: Zhenwen Xu<helight.xu@gmail.com>
Date: Wed, 4 Mar 2009 20:02:34 +0800
Subject: [PATCH] remove a unnecessary goto on drivers/leds/leds-s3c24xx.c
Signed-off-by: Zhenwen Xu<helight.xu@gmail.com>
---
drivers/leds/leds-s3c24xx.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index 4d81131..aa2e7ae 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 = {
--
1.5.6.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-04 12:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04 12:11 [PATCH]remove a unnecessary "goto" on drivers/leds/leds-s3c24.c Zhenwen Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox