Skip to content

Commit

Permalink
ALSA: line6: Don't forget to call driver's destructor at error path
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jan 28, 2015
1 parent 6dd1c05 commit eedd0e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/usb/line6/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eedd0e9

Please sign in to comment.