Skip to content

ASoC: sti: regmap_field usage improvements

Sander Vanheule linux-sound lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ASoC: sti: Return errors from regmap_field_alloc()sound/soc/sti/uniperif_player.c+5 -00 replies
2/2ASoC: sti: use managed regmap_field allocationssound/soc/sti/uniperif_player.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] ASoC: sti: regmap_field usage improvements

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(-)
Signature · 1 line
2.53.0