Skip to content

sound/alsa/soc/codec: fix memory leak and resource relaim in error path

Axel Lin lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 1 replyIn review
  2. v112 patches 10 repliesSuperseded

Changes in v2 from the cover letter

wm8940: follow Guennadi's comment to move the buffer allocate and release
at the same level to prevent the memory leak.
wm9081: follow Guennadi's comment to move the buffer allocate and release
at the same level to prevent the memory leak.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12ad1836: fix a memory leak if another ad1836 is registeredsound/soc/codecs/ad1836.c+1 -00 replies
2/12ak4642: fix a memory leak if failed to initialise AK4642sound/soc/codecs/ak4642.c+3 -10 replies
3/12da7210: fix a memory leak if failed to initialise da7210 audio codecsound/soc/codecs/da7210.c+6 -20 replies
4/12wm8523: fix resource reclaim in wm8523_register error pathsound/soc/codecs/wm8523.c+6 -40 replies
5/12wm8711: fix a memory leak if another WM8711 is registeredsound/soc/codecs/wm8711.c+2 -10 replies
6/12wm8904: fix resource reclaim in wm8904_register error pathsound/soc/codecs/wm8904.c+8 -50 replies
7/12wm8940: fix a memory leak if wm8940_register return errorsound/soc/codecs/wm8940.c+6 -10 replies
8/12wm8955: fix resource reclaim in wm8955_register error pathsound/soc/codecs/wm8955.c+6 -40 replies
9/12wm8961: fix resource reclaim in wm8961_register error pathsound/soc/codecs/wm8961.c+5 -40 replies
10/12wm8974: fix a memory leak if another WM8974 is registeredsound/soc/codecs/wm8974.c+2 -10 replies
11/12wm8978: fix a memory leak if a wm8978_register failsound/soc/codecs/wm8978.c+7 -30 replies
12/12wm9081: fix resource reclaim in wm9081_register error pathsound/soc/codecs/wm9081.c+6 -50 replies

Reviews trailers per patch

3 of 12 patches have a Reviewed-by or Acked-by.

PatchBarry SongKuninori MorimotoGuennadi Liakhovetski
1/12A-b
2/12R-b
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12R-b
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/12] sound/alsa/soc/codec: fix memory leak and resource relaim in error path

This serial of patches fixes memory leak and resource relaim in error path

I made a mistake that changed the subject line for some of the update patches. So. here is a re-send and all patches are marked as v2.

Regards,
Axel

changes for v2:
wm8940: follow Guennadi's comment to move the buffer allocate and release
at the same level to prevent the memory leak.
wm9081: follow Guennadi's comment to move the buffer allocate and release
at the same level to prevent the memory leak.

Axel Lin (12):
ad1836: fix a memory leak if another ad1836 is registered
ak4642: fix a memory leak if failed to initialise AK4642
da7210: fix a memory leak if failed to initialise da7210 audio codec
wm8523: fix resource reclaim in wm8523_register error path
wm8711: fix a memory leak if another WM8711 is registered
wm8904: fix resource reclaim in wm8904_register error path
wm8940: fix a memory leak if wm8940_register return error
wm8955: fix resource reclaim in wm8955_register error path
wm8961: fix resource reclaim in wm8961_register error path
wm8974: fix a memory leak if another WM8974 is registered
wm8978: fix a memory leak if a wm8978_register fail
wm9081: fix resource reclaim in wm9081_register error path

 sound/soc/codecs/ad1836.c |    1 +
 sound/soc/codecs/ak4642.c |    4 +++-
 sound/soc/codecs/da7210.c |    8 ++++++--
 sound/soc/codecs/wm8523.c |   10 ++++++----
 sound/soc/codecs/wm8711.c |    3 ++-
 sound/soc/codecs/wm8904.c |   13 ++++++++-----
 sound/soc/codecs/wm8940.c |    7 ++++++-
 sound/soc/codecs/wm8955.c |   10 ++++++----
 sound/soc/codecs/wm8961.c |    9 +++++----
 sound/soc/codecs/wm8974.c |    3 ++-
 sound/soc/codecs/wm8978.c |   10 +++++++---
 sound/soc/codecs/wm9081.c |   11 ++++++-----
 12 files changed, 58 insertions(+), 31 deletions(-)