summaryrefslogtreecommitdiff
path: root/sound/usb/usx2y/usX2Yhwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-05-17 16:15:39 +0300
committerTakashi Iwai <tiwai@suse.de>2021-05-17 17:04:22 +0300
commita11aa8537e13dd1082c85b102b98afc2a156a815 (patch)
tree73c9d400c2dbd1679f310f6af58412525c8afbe3 /sound/usb/usx2y/usX2Yhwdep.c
parent4e268db74770b454b877ab5260f1868a457d212c (diff)
downloadlinux-a11aa8537e13dd1082c85b102b98afc2a156a815.tar.xz
ALSA: usx2y: Avoid self-killing
The initialization os usx2y driver is multi-staged, and the PCM and other device creations are done after the DSP is loaded and initialized. Upon the initialization, when an error happens, the driver tries to call snd_card_free(). But this is dangerous, and in general, the driver cannot kill itself during its operation. Hence better to drop the snd_card_free() call from there. Link: https://lore.kernel.org/r/20210517131545.27252-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y/usX2Yhwdep.c')
-rw-r--r--sound/usb/usx2y/usX2Yhwdep.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c
index 0ed50be89271..ec7e3beed4f9 100644
--- a/sound/usb/usx2y/usX2Yhwdep.c
+++ b/sound/usb/usx2y/usX2Yhwdep.c
@@ -220,7 +220,6 @@ static int snd_usx2y_hwdep_dsp_load(struct snd_hwdep *hw,
err = usx2y_create_alsa_devices(hw->card);
if (err) {
snd_printk(KERN_ERR "usx2y_create_alsa_devices error %i\n", err);
- snd_card_free(hw->card);
return err;
}
priv->chip_status |= USX2Y_STAT_CHIP_INIT;