[PATCH v2 00/12] pinctrl: Fix resource leaks, out-of-bounds accesses, and error handling (batch 2)
From: Lee Jones
Date: Thu Nov 19 2026 - 15:50:47 EST
These issues were reported by Sashiko (batch 2).
v1 => v2:
- Rebase onto pinctrl for-next, dropping the manual fwnode_handle_put()
in npcm7xx_gpio_of() now covered by __free(fwnode_handle)
- ma35: Explicitly include the I/O mapping header for iounmap()
- ma35: Retain a reference on bank->fwnode in ma35_pinctrl_get_soc_data()
(Sashiko)
- ma35: Correct the description of commit 3fd976afe974 in the
dt_node_to_map commit message (Sashiko)
- npcm7xx, npcm8xx: Release GPIO bank fwnode_iomap() mappings via devres
on error (Sashiko)
- single: Switch *map and settings in pcs_dt_node_to_map() and
pcs_parse_pinconf() to unmanaged kcalloc()/kfree() so devres teardown
cannot free *map before pcs_dt_free_map() runs
v1: https://lore.kernel.org/all/20261111215256.1982044-1-lee@xxxxxxxxxx/
Cc: Alexander Sverdlin <alex@xxxxxxxxxxxx>
Cc: "Andreas Färber" <afaerber@xxxxxxxx>
Cc: Andrew Gaylard <ag@xxxxxxxxxxxx>
Cc: Andrew Jeffery <andrew@xxxxxxxxxxxxxxxxxxxx>
Cc: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Cc: Avi Fishman <avifishman70@xxxxxxxxx>
Cc: Benjamin Fair <benjaminfair@xxxxxxxxxx>
Cc: Dvorkin Dmitry <dvorkin@xxxxxxxxx>
Cc: Haojian Zhuang <haojian.zhuang@xxxxxxxxxx>
Cc: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
Cc: Jacky Huang <ychuang3@xxxxxxxxxxx>
Cc: James Tai <james.tai@xxxxxxxxxxx>
Cc: jordan_hargrave@xxxxxxxx
Cc: Linus Walleij <linusw@xxxxxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-gpio@xxxxxxxxxxxxxxx
Cc: linux-omap@xxxxxxxxxxxxxxx
Cc: linux-realtek-soc@xxxxxxxxxxxxxxxxxxx
Cc: Nancy Yuen <yuenn@xxxxxxxxxx>
Cc: openbmc@xxxxxxxxxxxxxxxx
Cc: Patrick Venture <venture@xxxxxxxxxx>
Cc: Shan-Chun Hung <schung@xxxxxxxxxxx>
Cc: Tali Perry <tali.perry1@xxxxxxxxx>
Cc: tomer.maimon@xxxxxxxxxxx
Cc: Tomer Maimon <tmaimon77@xxxxxxxxx>
Cc: Tony Lindgren <tony@xxxxxxxxxxx>
Cc: Tzuyi Chang <tychang@xxxxxxxxxxx>
Cc: Wells Lu <wellslutw@xxxxxxxxx>
Cc: Yu-Chun Lin <eleanor.lin@xxxxxxxxxxx>
Lee Jones (12):
pinctrl: nuvoton: ma35: Unmap reg_base and release clock on probe
error
pinctrl: nuvoton: ma35: Prevent out-of-bounds write in
ma35_pinctrl_get_soc_data()
pinctrl: nuvoton: ma35: Retain child firmware node reference in
ma35_pinctrl_get_soc_data()
pinctrl: nuvoton: ma35: Assign fwnode to gpio_chip in
ma35_gpiolib_register()
pinctrl: nuvoton: ma35: Avoid leaking map when parent node is missing
pinctrl: nuvoton: Unmap GPIO bank registers on error in NPCM7xx and
NPCM8xx
pinctrl: nuvoton: npcm8xx: Propagate npcm8xx_gpio_register() error in
probe
pinctrl: nuvoton: npcm7xx: Fix fwnode_irq_get() error check in
npcm7xx_gpio_of()
pinctrl: single: Reject invalid register width in pcs_probe()
pinctrl: single: Free pinconf settings array in pcs_dt_free_map()
pinctrl: sunplus: Validate pin_func index in sppctl_dt_node_to_map()
pinctrl: realtek: rtd1625: Set dcycle_offset to NA for pins without
duty-cycle support
drivers/pinctrl/nuvoton/pinctrl-ma35.c | 70 +++++++++++++++++++----
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 20 +++++--
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 15 ++++-
drivers/pinctrl/pinctrl-single.c | 49 ++++++++--------
drivers/pinctrl/realtek/pinctrl-rtd1625.c | 12 ++--
drivers/pinctrl/sunplus/sppctl.c | 7 ++-
6 files changed, 126 insertions(+), 47 deletions(-)
--
2.56.1.750.gf70dc682cf-goog