mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sander Vanheule <sander@svanheule.net>
To: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sander Vanheule <sander@svanheule.net>
Subject: [PATCH 0/2] ASoC: sti: regmap_field usage improvements
Date: Fri, 20 Feb 2026 16:26:32 +0100	[thread overview]
Message-ID: <20260220152634.480766-1-sander@svanheule.net> (raw)

uni_player_parse_dt_audio_glue() allocates two regmap_field objects on
the device's regmap. However, error codes from these allocations are not
propagated correctly and the resources will leak on device removal.

These issues were found while looking for users of regmap_field_alloc(),
to assess the impact of adding a cleanup helper for regmap_field. It
appears this driver is the only (remaining) in-tree user of this
allocator. Since the resources are long-lived, it may as well switch to
devm_regmap_field_alloc().

As I don't have access to this hardware, these patches were only compile
tested on a UM build.

Sander Vanheule (2):
  ASoC: sti: Return errors from regmap_field_alloc()
  ASoC: sti: use managed regmap_field allocations

 sound/soc/sti/uniperif_player.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

-- 
2.53.0


             reply	other threads:[~2026-02-20 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20 15:26 Sander Vanheule [this message]
2026-02-20 15:26 ` [PATCH 1/2] ASoC: sti: Return errors from regmap_field_alloc() Sander Vanheule
2026-02-20 15:26 ` [PATCH 2/2] ASoC: sti: use managed regmap_field allocations Sander Vanheule
2026-03-03 11:20 ` [PATCH 0/2] ASoC: sti: regmap_field usage improvements Mark Brown

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=20260220152634.480766-1-sander@svanheule.net \
    --to=sander@svanheule.net \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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®