summaryrefslogtreecommitdiffstats
path: root/sound/firewire/motu
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-08-20 02:55:02 -0400
committerTakashi Iwai <tiwai@suse.de>2017-08-20 03:40:45 -0400
commitdbd7396b4f24e0c3284fcc05f5def24f52c09884 (patch)
tree4f5579e0621298f32f08fcf9d2b5cbe555ac1443 /sound/firewire/motu
parent0c264af7be2013266c5b4c644f3f366399ee490a (diff)
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: 9b2bb4f2f4a2 ('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>
Diffstat (limited to 'sound/firewire/motu')
-rw-r--r--sound/firewire/motu/motu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/firewire/motu/motu.c b/sound/firewire/motu/motu.c
index bf779cfeef0d..59a270406353 100644
--- a/sound/firewire/motu/motu.c
+++ b/sound/firewire/motu/motu.c
@@ -128,6 +128,7 @@ static void do_registration(struct work_struct *work)
128 return; 128 return;
129error: 129error:
130 snd_motu_transaction_unregister(motu); 130 snd_motu_transaction_unregister(motu);
131 snd_motu_stream_destroy_duplex(motu);
131 snd_card_free(motu->card); 132 snd_card_free(motu->card);
132 dev_info(&motu->unit->device, 133 dev_info(&motu->unit->device,
133 "Sound card registration failed: %d\n", err); 134 "Sound card registration failed: %d\n", err);