<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/sound/hda/common/codec.c, branch linux-6.19.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.19.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-26T23:00:56+00:00</updated>
<entry>
<title>ALSA: hda: Relax __free() variable declarations</title>
<updated>2026-02-26T23:00:56+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-12-16T14:06:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=619b0029c8f491249d19d92810cacac4ad657000'/>
<id>urn:sha1:619b0029c8f491249d19d92810cacac4ad657000</id>
<content type='text'>
[ Upstream commit 04c654624f41d3c3eee48e9837a52d8a2bbc7332 ]

We used to have a variable declaration with __free() initialized with
NULL.  This was to keep the old coding style rule, but recently it's
relaxed and rather recommends to follow the new rule to declare in
place of use for __free() -- which avoids potential deadlocks or UAFs
with nested cleanups.

Although the current code has no bug, per se, let's follow the new
standard and move the declaration to the place of assignment (or
directly assign the allocated result) instead of NULL initializations.

Fixes: ee0b0f5d32fe ("ALSA: hda/generic: Use auto cleanup for temporary buffers")
Fixes: 03c5c350e38d ("ALSA: hda/realtek: Add support for new HP G12 laptops")
Fixes: b0550d4c2dd8 ("ALSA: hda/common: Use auto cleanup for temporary buffers")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20251216140634.171890-10-tiwai@suse.de
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: hda/common: Use guard() for spinlocks</title>
<updated>2025-08-29T09:52:15+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-08-27T07:29:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3cafe16317761bf4ea94ee6be1616dd873f698fb'/>
<id>urn:sha1:3cafe16317761bf4ea94ee6be1616dd873f698fb</id>
<content type='text'>
Replace the manual spin lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250827072916.31933-25-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: hda/common: Use auto cleanup for temporary buffers</title>
<updated>2025-08-29T09:52:15+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-08-27T07:28:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b0550d4c2dd8353f59e06139b8f3045782ce115d'/>
<id>urn:sha1:b0550d4c2dd8353f59e06139b8f3045782ce115d</id>
<content type='text'>
The release of temporary kmalloced buffers can be nicely handled via
the standard __free(kfree).

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250827072916.31933-20-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: hda/common: Use guard() for mutex locks</title>
<updated>2025-08-29T09:52:14+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-08-27T07:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62dd3851d2450a5fb2259da1f0391b5870e07577'/>
<id>urn:sha1:62dd3851d2450a5fb2259da1f0391b5870e07577</id>
<content type='text'>
Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250827072916.31933-8-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: hda/common: Use cleanup macros for PM controls</title>
<updated>2025-08-29T09:52:14+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-08-27T07:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8dad6b3dac2794c52d63b2336138392eddc17936'/>
<id>urn:sha1:8dad6b3dac2794c52d63b2336138392eddc17936</id>
<content type='text'>
The new macro CLASS(snd_hda_power_pm) can replace the manual
snd_hda_power_up_pm() and _down() calls gracefully.

A part of the code in codec_exec_verb() is factored out to a function,
so that the auto-cleanup can be well scoped.

Merely cleanups and no functional changes.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250827072916.31933-6-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: hda: Use min() to simplify snd_hda_get_devices()</title>
<updated>2025-08-14T06:39:54+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-13T20:55:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c308bb4190a8f6f09270b541457d6ae905d2f7bc'/>
<id>urn:sha1:c308bb4190a8f6f09270b541457d6ae905d2f7bc</id>
<content type='text'>
Use min() to simplify snd_hda_get_devices() and improve its readability.

Change the function parameter 'max_devices' from 'int' to 'unsigned int'
to avoid a min() signedness error. Update all related local variables
and the function's return type to 'unsigned int' accordingly.

No functional changes intended.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://patch.msgid.link/20250813205507.215658-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Improve local variable data type in snd_hda_get_num_devices()</title>
<updated>2025-08-13T15:44:45+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-13T10:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=113e9a284d4372322da90c05f1dc36e0a52e5fca'/>
<id>urn:sha1:113e9a284d4372322da90c05f1dc36e0a52e5fca</id>
<content type='text'>
Use 'int' instead of 'unsigned int' because the local variable 'parm'
can be negative.

While an unsigned integer is harmless in practice due to the implicit
type conversion, it's safer and more idiomatic to use a signed integer
to properly check for -1.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://patch.msgid.link/20250813103418.164110-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Use safer strscpy() instead of strcpy()</title>
<updated>2025-07-11T11:36:20+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-07-11T08:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bdbce25855f021187d16d4ffbb92102b9f13788'/>
<id>urn:sha1:0bdbce25855f021187d16d4ffbb92102b9f13788</id>
<content type='text'>
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Link: https://patch.msgid.link/20250711083051.18759-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Return the codec init error properly at snd_hda_codec_build_controls()</title>
<updated>2025-07-11T07:55:38+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-07-09T16:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c8e393941d25ea13a659f184c6dc76194a473b5'/>
<id>urn:sha1:0c8e393941d25ea13a659f184c6dc76194a473b5</id>
<content type='text'>
The error from snd_hda_codec_init() was ignored in
snd_hda_codec_build_controls(), which should have been taken account
and abort the flow.  Fix it now.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250709160434.1859-28-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: hda: Drop superfluous driver-&gt;ops NULL checks</title>
<updated>2025-07-11T07:55:38+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-07-09T16:04:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=691351de31684b98a7366b08cd278bb057b51fce'/>
<id>urn:sha1:691351de31684b98a7366b08cd278bb057b51fce</id>
<content type='text'>
After all conversions, driver-&gt;ops became a must in most places
(except for the codec power setup which might be called before binding
to the codec driver), hence we can get rid of the superfluous
driver-&gt;ops NULL checks, too.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250709160434.1859-26-tiwai@suse.de
</content>
</entry>
</feed>
