]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: oss: Release temporary buffers upon errors
authorTakashi Iwai <tiwai@suse.de>
Fri, 18 Mar 2022 08:21:57 +0000 (09:21 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 18 Mar 2022 13:01:28 +0000 (14:01 +0100)
commita4215a0909f9ad23f8c3ad80934cf5f49256dd81
treedd6585959eaf89354bc9f12b72c4bd2a45dd43e2
parent73158141f4e135edce9fe4bb01591c868baaa8c1
ALSA: oss: Release temporary buffers upon errors

When the parameter changes fails, we don't need to keep the old
temporary buffers.  Release those (and plugin instances) upon errors
for reducing dead memory footprint.  Since we always call it at the
exit of snd_pcm_oss_changes_params_locked(), the explicit calls of
snd_pcm_oss_plugin_clear() can be dropped, too.

Along with it, unify the buffer-free calls to a single helper and call
it from the needed places.

Link: https://lore.kernel.org/r/20220318082157.29769-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c