瀏覽代碼

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: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 10 年之前
父節點
當前提交
eedd0e95d3
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      sound/usb/line6/driver.c

+ 2 - 0
sound/usb/line6/driver.c

@@ -568,6 +568,8 @@ int line6_probe(struct usb_interface *interface,
 	return 0;
 
  err_destruct:
+	if (line6->disconnect)
+		line6->disconnect(interface);
 	snd_card_free(card);
  err_put:
 	return ret;