mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] pinctrl: free maps on DT mapping failures
@ 2026-10-03  8:31 Jiale Yao
  2026-10-03  8:31 ` [PATCH v2 1/4] pinctrl: sprd: free maps on DT map failure Jiale Yao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jiale Yao @ 2026-10-03  8:31 UTC (permalink / raw)
  To: Geert Uytterhoeven, Linus Walleij, Krzysztof Kozlowski,
	Sylwester Nawrocki, Peter Griffin, Alim Akhtar, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Thierry Reding, Jonathan Hunter,
	linux-renesas-soc, linux-gpio, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-tegra
  Cc: Jiale Yao

Several pinctrl drivers reserve map storage before appending mux and
configuration entries while translating device tree nodes.  If a later
operation fails, their error paths free only temporary configuration data
and leave the partially built map allocated.

Commit 17007cd70060 ("pinctrl: generic: free maps on
pinctrl_generic_to_map() failure") fixed the same cleanup problem in the
generic mapping helper.  These drivers use their own mapping callbacks and
need equivalent error handling.

Free the accumulated map on every failure path in the Spreadtrum, Renesas
RZ/N1, Tegra XUSB, and Samsung drivers.  Each patch changes one driver and
remains independently buildable.

Changes in v2:
- Add the Fixes tag and Baolin's Reviewed-by tag to patch 1.
- Drop the unnecessary output parameter resets from all four patches and
  update their commit messages accordingly.

Jiale Yao (4):
  pinctrl: sprd: free maps on DT map failure
  pinctrl: renesas: rzn1: free maps on DT map failure
  pinctrl: tegra: xusb: free maps on DT map failure
  pinctrl: samsung: free maps on DT map failure

 drivers/pinctrl/renesas/pinctrl-rzn1.c     |  8 ++++++--
 drivers/pinctrl/samsung/pinctrl-samsung.c  | 24 ++++++++++++++--------
 drivers/pinctrl/sprd/pinctrl-sprd.c        |  3 +++
 drivers/pinctrl/tegra/pinctrl-tegra-xusb.c |  6 +++++-
 4 files changed, 29 insertions(+), 12 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-10-03  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-03  8:31 [PATCH v2 0/4] pinctrl: free maps on DT mapping failures Jiale Yao
2026-10-03  8:31 ` [PATCH v2 1/4] pinctrl: sprd: free maps on DT map failure Jiale Yao
2026-10-03  8:31 ` [PATCH v2 2/4] pinctrl: renesas: rzn1: " Jiale Yao
2026-10-03  8:31 ` [PATCH v2 3/4] pinctrl: tegra: xusb: " Jiale Yao
2026-10-03  8:31 ` [PATCH v2 4/4] pinctrl: samsung: " Jiale Yao

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

all inboxes | Powered by JetHome®