mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiale Yao <yaojiale02@163.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	Linus Walleij <linusw@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Peter Griffin <peter.griffin@linaro.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org
Cc: Jiale Yao <yaojiale02@163.com>
Subject: [PATCH v2 0/4] pinctrl: free maps on DT mapping failures
Date: Sat,  3 Oct 2026 16:31:53 +0800	[thread overview]
Message-ID: <20261003083200.459705-1-yaojiale02@163.com> (raw)

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


             reply	other threads:[~2026-10-03  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03  8:31 Jiale Yao [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261003083200.459705-1-yaojiale02@163.com \
    --to=yaojiale02@163.com \
    --cc=alim.akhtar@samsung.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=geert+renesas@glider.be \
    --cc=jonathanh@nvidia.com \
    --cc=krzk@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=peter.griffin@linaro.org \
    --cc=s.nawrocki@samsung.com \
    --cc=thierry.reding@kernel.org \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®