diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-31 11:34:46 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-07-31 11:36:06 +0300 |
commit | 825a52482a616d74bd2f5eacc0f8946d025499a7 (patch) | |
tree | c9c83fbe54d3590b7f1b1b621bbc4a0bf4267cf0 /sound/usb/clock.c | |
parent | fac24b0f34c179c6ca863f5205fad42a676caf9a (diff) | |
download | linux-825a52482a616d74bd2f5eacc0f8946d025499a7.tar.xz |
ALSA: core: Fix double calls of snd_card_free() via devres
At the transition to the devres-managed card release, we've put the
check of double-free at trigger_card_release(). But this wasn't
enough, as the code path calls snd_card_free() again, and it would
lead to the doubly snd_card_free() calls.
Actually the v1 patch was correct to handle this, but I forgot that
corner case and moved the check to the more obvious place as I thought
it's clearer. But, as usual, devils live in details.
This patch corrects the check of the double-free to the right place,
with a bit more comments.
Fixes: e8ad415b7a55 ("ALSA: core: Add managed card creation")
Link: https://lore.kernel.org/r/20210731083446.26680-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/clock.c')
0 files changed, 0 insertions, 0 deletions