mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
ALSA: firewire-motu: destroy stream data surely at failure of card initialization
When failing sound card registration after initializing stream data, this
module leaves allocated data in stream data. This commit fixes the bug.
Fixes: 9b2bb4f2f4
('ALSA: firewire-motu: add stream management functionality')
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
0c264af7be
commit
dbd7396b4f
@ -128,6 +128,7 @@ static void do_registration(struct work_struct *work)
|
||||
return;
|
||||
error:
|
||||
snd_motu_transaction_unregister(motu);
|
||||
snd_motu_stream_destroy_duplex(motu);
|
||||
snd_card_free(motu->card);
|
||||
dev_info(&motu->unit->device,
|
||||
"Sound card registration failed: %d\n", err);
|
||||
|
Loading…
Reference in New Issue
Block a user