lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200917223338.14164-23-marek.behun@nic.cz>
Date:   Fri, 18 Sep 2020 00:33:10 +0200
From:   Marek Behún <marek.behun@....cz>
To:     linux-leds@...r.kernel.org
Cc:     Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        Ondřej Jirman <megous@...ous.com>,
        linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        devicetree@...r.kernel.org,
        Marek Behún <marek.behun@....cz>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: [PATCH leds v2 22/50] 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@....cz>
Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
---
 drivers/leds/leds-pm8058.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c
index 70b4d06488fec..193780a8c0522 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[] = {
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ