diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-14 09:31:49 +0300 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-12-30 21:37:14 +0300 |
commit | 66898f3fe906364e36fddd5d6292d52022357cf4 (patch) | |
tree | e4f4d68ba0e8220f4f4717a6fb1c8fdd4bfa3fba /drivers/leds/leds-ss4200.c | |
parent | 5ccfa39ddd474fc2edc844539528d10f5f462b54 (diff) | |
download | linux-66898f3fe906364e36fddd5d6292d52022357cf4.tar.xz |
leds: ss4200: simplify the return expression of register_nasgpio_led()
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-ss4200.c')
-rw-r--r-- | drivers/leds/leds-ss4200.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c index a6992323d69d..fcaa34706b6c 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) |