Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] gpio: Fix Critical and High issues reported by Sashiko
@ 2026-12-03 20:54 Lee Jones
  2026-12-03 20:55 ` [PATCH 04/10] gpio: rockchip: Unregister gpiochip on pin-range lookup errors Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Lee Jones @ 2026-12-03 20:54 UTC (permalink / raw)
  To: lee, Heiko Stuebner, linux-arm-kernel, linux-rockchip
  Cc: linux-kernel, Alex Marginean, Andrew Lunn, Andy Shevchenko,
	Arnd Bergmann, Asmaa Mnebhi, Bartosz Golaszewski,
	Grygorii Strashko, Guangshuo Li, Jan Kotas, Janusz Krzysztofik,
	Jason Cooper, Jianqun Xu, Keerthy, Laurentiu Tudor, Linus Walleij,
	linux-acpi, linux-gpio, Mary Strodl, Mathias Nyman,
	Mathieu Dubois-Briand, Michael Walle, Mika Westerberg,
	Peter Korsgaard, Rosen Penev, Sebastian Hesselbarth, Song Hui,
	Thomas Petazzoni, William Breathitt Gray

These issues were reported by Sashiko.

Cc: Alex Marginean <alexandru.marginean@nxp.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Asmaa Mnebhi <asmaa@nvidia.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Jan Kotas <jank@cadence.com>
Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Jianqun Xu <jay.xu@rock-chips.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Laurentiu Tudor <Laurentiu.Tudor@nxp.com>
Cc: Linus Walleij <linusw@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: Mary Strodl <mstrodl@csh.rit.edu>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Cc: Michael Walle <mwalle@kernel.org>
Cc: Mika Westerberg <westeri@kernel.org>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Rosen Penev <rosenp@gmail.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Song Hui <hui.song_1@nxp.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: William Breathitt Gray <wbg@kernel.org>

Lee Jones (10):
  gpio: davinci: Validate ngpio against MAX_REGS_BANKS in
    davinci_gpio_probe()
  gpiolib: acpi: Hold gpio_device reference in
    acpi_dev_gpio_irq_wake_get_by()
  gpio: mvebu: Clear chained IRQ handlers on unbind
  gpio: rockchip: Unregister gpiochip on pin-range lookup errors
  gpiolib: Avoid undersized array bitmap in set fastpath
  gpio: mlxbf2: Embed context save registers to prevent suspend NULL
    dereference
  gpio: regmap: Use resolved chip->ngpio for default ngpio_per_reg
  gpio: mpc8xxx: Drop stale remove callback clearing chained handler
  gpio: mpsse: Allocate DMA-safe buffer in mpsse_write()
  gpio: pcie-idio-24: Fix COS_ENABLE_RISING bit definition

 drivers/gpio/gpio-davinci.c      |  6 +++++-
 drivers/gpio/gpio-mlxbf2.c       | 14 +++++---------
 drivers/gpio/gpio-mpc8xxx.c      |  9 ---------
 drivers/gpio/gpio-mpsse.c        | 12 +++++++-----
 drivers/gpio/gpio-mvebu.c        | 15 ++++++++++++++-
 drivers/gpio/gpio-pcie-idio-24.c |  2 +-
 drivers/gpio/gpio-regmap.c       |  2 +-
 drivers/gpio/gpio-rockchip.c     | 12 ++++++++----
 drivers/gpio/gpiolib-acpi-core.c |  9 +++++++--
 drivers/gpio/gpiolib.c           |  5 +++--
 drivers/gpio/gpiolib.h           |  2 ++
 11 files changed, 53 insertions(+), 35 deletions(-)

-- 
2.56.1.911.g883d8bcb20-goog



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 04/10] gpio: rockchip: Unregister gpiochip on pin-range lookup errors
  2026-12-03 20:54 [PATCH 00/10] gpio: Fix Critical and High issues reported by Sashiko Lee Jones
@ 2026-12-03 20:55 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2026-12-03 20:55 UTC (permalink / raw)
  To: lee, Linus Walleij, Bartosz Golaszewski, Heiko Stuebner,
	Jianqun Xu, linux-gpio, linux-arm-kernel, linux-rockchip
  Cc: linux-kernel, stable

After gpiochip_add_data() succeeds in rockchip_gpiolib_register(), the
fallback path when gpio-ranges is absent returns -ENODATA or -ENODEV
directly when the parent pinctrl node or device cannot be found,
skipping the fail label that calls gpiochip_remove().

Jump to the fail label on both error paths so the GPIO chip is properly
unregistered on probe failure.

Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio")
Closes: https://sashiko.dev/#/bug/linux-d336bb33-7381-45ac-868f-1124190c27a1
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
 drivers/gpio/gpio-rockchip.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index 714604c11d78..a620c98718de 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -613,13 +613,17 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank)
 		struct device_node *pctlnp = of_get_parent(bank->of_node);
 		struct pinctrl_dev *pctldev = NULL;
 
-		if (!pctlnp)
-			return -ENODATA;
+		if (!pctlnp) {
+			ret = -ENODATA;
+			goto fail;
+		}
 
 		pctldev = of_pinctrl_get(pctlnp);
 		of_node_put(pctlnp);
-		if (!pctldev)
-			return -ENODEV;
+		if (!pctldev) {
+			ret = -ENODEV;
+			goto fail;
+		}
 
 		ret = gpiochip_add_pin_range(gc, dev_name(pctldev->dev), 0,
 					     bank->pin_base, bank->nr_pins);
-- 
2.56.1.911.g883d8bcb20-goog



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-03 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 20:54 [PATCH 00/10] gpio: Fix Critical and High issues reported by Sashiko Lee Jones
2026-12-03 20:55 ` [PATCH 04/10] gpio: rockchip: Unregister gpiochip on pin-range lookup errors Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox