Commit eedd0e95 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: line6: Don't forget to call driver's destructor at error path

Currently disconnect callback is used as a driver's destructor, and
this has to be called not only at the disconnection time but also at
the error paths during probe.
Tested-by: default avatarChris Rorvick <chris@rorvick.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6dd1c05c
...@@ -568,6 +568,8 @@ int line6_probe(struct usb_interface *interface, ...@@ -568,6 +568,8 @@ int line6_probe(struct usb_interface *interface,
return 0; return 0;
err_destruct: err_destruct:
if (line6->disconnect)
line6->disconnect(interface);
snd_card_free(card); snd_card_free(card);
err_put: err_put:
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment