From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: broonie@kernel.org
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: [PATCH v2 0/3] ASoC: cs35l56: Fix some cleanup memory leaks
Date: Wed, 10 Jun 2026 10:34:29 +0100	[thread overview]
Message-ID: <20260610093432.557375-1-rf@opensource.cirrus.com> (raw)

These are for-next.

They are not urgent because it only leaks memory if the driver failed to
component_probe or is removed, which wouldn't happen in normal use.

This series fixes some memory leaks:
- The memory allocated by wm_adsp/cs_dsp was not freed.
- If component_probe() failed it didn't clean up.

The addition of this cleanup in patch #3 exposes an existing possible
double-free of the debugfs, which is fixed in patch #2.

Changes in V2:
- Added patch to prevent the double-free of debugfs

Richard Fitzgerald (3):
  ASoC: cs35l56: Fix missing calls to wm_adsp2_remove()
  ASoC: cs35l56: Prevent double-free of debugfs
  ASoC: cs35l56: Cleanup if component_probe fails

 sound/soc/codecs/cs35l56-shared.c |  1 +
 sound/soc/codecs/cs35l56.c        | 20 ++++++++++++++++++--
 sound/soc/codecs/wm_adsp.c        |  7 +++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

-- 
2.47.3


             reply	other threads:[~2026-06-10  9:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10  9:34 Richard Fitzgerald [this message]
2026-06-10  9:34 ` [PATCH v2 1/3] ASoC: cs35l56: Fix missing calls to wm_adsp2_remove() Richard Fitzgerald
2026-06-10  9:34 ` [PATCH v2 2/3] ASoC: cs35l56: Prevent double-free of debugfs Richard Fitzgerald
2026-06-10  9:34 ` [PATCH v2 3/3] ASoC: cs35l56: Cleanup if component_probe fails Richard Fitzgerald
2026-06-10 10:24 ` [PATCH v2 0/3] ASoC: cs35l56: Fix some cleanup memory leaks 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=20260610093432.557375-1-rf@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.