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>] [day] [month] [year] [list]
Message-Id: <20260119-v6-19-topic-ti-lp5860-fixes-v1-1-3b297fbc0c4d@pengutronix.de>
Date: Mon, 19 Jan 2026 13:43:03 +0100
From: Steffen Trumtrar <s.trumtrar@...gutronix.de>
To: Lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>
Cc: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Steffen Trumtrar <s.trumtrar@...gutronix.de>
Subject: [PATCH] leds: lp5860: Fix unused-but-set-variable warning

In lp5860_led_init the ret variable is set to the return value of
regmap_read. The ret is never returned or used which leads to a
-Wunused-but-set-variable warning.

Propagate the return value from the regmap_read and get rid of the warning.

Signed-off-by: Steffen Trumtrar <s.trumtrar@...gutronix.de>
---
 drivers/leds/rgb/leds-lp5860-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/leds/rgb/leds-lp5860-core.c b/drivers/leds/rgb/leds-lp5860-core.c
index 3f41a42bb9abf..977741a070d19 100644
--- a/drivers/leds/rgb/leds-lp5860-core.c
+++ b/drivers/leds/rgb/leds-lp5860-core.c
@@ -72,6 +72,8 @@ static int lp5860_led_init(struct lp5860_led *led, struct fwnode_handle *fwnode,
 	int ret;
 
 	ret = regmap_read(led->chip->regmap, LP5860_REG_PWM_BRI_START + channel, &brightness);
+	if (ret)
+		return ret;
 
 	default_state = led_init_default_state_get(fwnode);
 

---
base-commit: 33e822f6f4eba2cfbd09ffd080af221cf8c542b2
change-id: 20260119-v6-19-topic-ti-lp5860-fixes-e31039e00146

Best regards,
-- 
Steffen Trumtrar <s.trumtrar@...gutronix.de>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ