diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2020-09-18 01:33:10 +0300 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-09-26 22:56:40 +0300 |
commit | 1016daf98179c657c226bfa820e65f286edc2d29 (patch) | |
tree | ab414b46b00915132ad8a9b861e6bf6cacda22e4 /drivers/leds/leds-pm8058.c | |
parent | fb270ba0d9ba76bf40326ac328024fe35b05c1f6 (diff) | |
download | linux-1016daf98179c657c226bfa820e65f286edc2d29.tar.xz |
leds: pm8058: cosmetic change: no need to return in if guard
We can return the last ret value.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-pm8058.c')
-rw-r--r-- | drivers/leds/leds-pm8058.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c index db0699462e0d..5247b04abb7e 100644 --- a/drivers/leds/leds-pm8058.c +++ b/drivers/leds/leds-pm8058.c @@ -147,12 +147,10 @@ static int pm8058_led_probe(struct platform_device *pdev) init_data.fwnode = of_fwnode_handle(np); ret = devm_led_classdev_register_ext(dev, &led->cdev, &init_data); - if (ret) { + if (ret) dev_err(dev, "Failed to register LED for %pOF\n", np); - return ret; - } - return 0; + return ret; } static const struct of_device_id pm8058_leds_id_table[] = { |