linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 -next] leds: ss4200: simplify the return expression of register_nasgpio_led()
@ 2020-12-14  6:31 Zheng Yongjun
  2020-12-17 20:53 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-14  6:31 UTC (permalink / raw)
  To: pavel, marek.behun, linux-leds; +Cc: linux-kernel, Zheng Yongjun

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/leds/leds-ss4200.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
index 245de443fe9c..97abab439826 100644
--- a/drivers/leds/leds-ss4200.c
+++ b/drivers/leds/leds-ss4200.c
@@ -478,7 +478,6 @@ ATTRIBUTE_GROUPS(nasgpio_led);
 
 static int register_nasgpio_led(int led_nr)
 {
-	int ret;
 	struct nasgpio_led *nas_led = &nasgpio_leds[led_nr];
 	struct led_classdev *led = get_classdev_for_led_nr(led_nr);
 
@@ -489,11 +488,8 @@ static int register_nasgpio_led(int led_nr)
 	led->brightness_set = nasgpio_led_set_brightness;
 	led->blink_set = nasgpio_led_set_blink;
 	led->groups = nasgpio_led_groups;
-	ret = led_classdev_register(&nas_gpio_pci_dev->dev, led);
-	if (ret)
-		return ret;
 
-	return 0;
+	return led_classdev_register(&nas_gpio_pci_dev->dev, led);
 }
 
 static void unregister_nasgpio_led(int led_nr)
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 -next] leds: ss4200: simplify the return expression of register_nasgpio_led()
  2020-12-14  6:31 [PATCH v2 -next] leds: ss4200: simplify the return expression of register_nasgpio_led() Zheng Yongjun
@ 2020-12-17 20:53 ` Pavel Machek
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2020-12-17 20:53 UTC (permalink / raw)
  To: Zheng Yongjun; +Cc: marek.behun, linux-leds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

On Mon 2020-12-14 14:31:49, Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Thanks, applied.
								Pavel

-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-17 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14  6:31 [PATCH v2 -next] leds: ss4200: simplify the return expression of register_nasgpio_led() Zheng Yongjun
2020-12-17 20:53 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).