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-next>] [day] [month] [year] [list]
Message-ID: <20250708083829.658051-1-alexander.stein@ew.tq-group.com>
Date: Tue,  8 Jul 2025 10:38:29 +0200
From: Alexander Stein <alexander.stein@...tq-group.com>
To: Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>
Cc: Alexander Stein <alexander.stein@...tq-group.com>,
	linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] gpiolib: of: Initialize variable

of_flags is passed down to GPIO chip's xlate function, so ensure this one
is properly initialized.

Signed-off-by: Alexander Stein <alexander.stein@...tq-group.com>
---
I'm seeing errors like:
gpio-720 (enable): multiple pull-up, pull-down or pull-disable enabled, invalid configuration

Digging down it is caused because of_flags is not initialized and
gpiochip_fwd_delay_of_xlate() does not set/clear the passed flags
pointer.
Is the of_xlate function expected to clear flags or is this the right
location?

 drivers/gpio/gpiolib-of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 73ba73b31cb1f..37ab78243faba 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -708,7 +708,7 @@ struct gpio_desc *of_find_gpio(struct device_node *np, const char *con_id,
 			       unsigned int idx, unsigned long *flags)
 {
 	char propname[32]; /* 32 is max size of property name */
-	enum of_gpio_flags of_flags;
+	enum of_gpio_flags of_flags = 0;
 	const of_find_gpio_quirk *q;
 	struct gpio_desc *desc;
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ