Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: <tiwai@suse.com>, <broonie@kernel.org>, <perex@perex.cz>,
	<amade@asmblr.net>, <kuninori.morimoto.gx@renesas.com>,
	<linux-sound@vger.kernel.org>
Subject: Re: [PATCH v6] ALSA: control: Verify put() result when in debug mode
Date: Tue, 24 Feb 2026 16:46:55 +0100	[thread overview]
Message-ID: <8cfa8e20-1b6a-4d8f-8914-e085e839d250@intel.com> (raw)
In-Reply-To: <87o6lexs08.wl-tiwai@suse.de>

On 2026-02-24 1:09 PM, Takashi Iwai wrote:
> On Mon, 23 Feb 2026 15:49:37 +0100,
> Cezary Rojewski wrote:

...

>> --- a/sound/core/init.c
>> +++ b/sound/core/init.c
> (snip)
>> @@ -537,6 +542,9 @@ void snd_card_disconnect(struct snd_card *card)
>>   		synchronize_irq(card->sync_irq);
>>   
>>   	snd_info_card_disconnect(card);
>> +#ifdef CONFIG_SND_CTL_DEBUG
>> +	kfree(card->value_buf);
>> +#endif
>>   #ifdef CONFIG_SND_DEBUG
>>   	debugfs_remove(card->debugfs_root);
>>   	card->debugfs_root = NULL;
> 
> IMO, it's better to be put in snd_card_do_free() which is the place to
> release the actual resources.

No problem, a question though - I've written the above to be cohesive as 
CONFIG_SND_DEBUG-part isn't part of snd_card_do_free() and what I'm 
adding is definitely also of debug-related capability. IIRC 
debugfs_remove() may invoke kfree() operations. Why isn't it part of 
snd_card_do_free() too?


Kind regards,
Czarek

  reply	other threads:[~2026-02-24 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 14:49 [PATCH v6] ALSA: control: Verify put() result when in debug mode Cezary Rojewski
2026-02-24 12:09 ` Takashi Iwai
2026-02-24 15:46   ` Cezary Rojewski [this message]
2026-02-24 15:59     ` Takashi Iwai
2026-02-24 13:21 ` Jaroslav Kysela
2026-02-24 15:36   ` Cezary Rojewski

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=8cfa8e20-1b6a-4d8f-8914-e085e839d250@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=amade@asmblr.net \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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