ALSA: seq: Fix leftovers at probe error path
authorTakashi Iwai <tiwai@suse.de>
Wed, 1 Aug 2018 14:37:02 +0000 (16:37 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 1 Aug 2018 20:54:36 +0000 (22:54 +0200)
commit00976ad5271999ba06d24319fd1031b178aff832
tree0c88e68218eafd09b3d2b85179ab13fb199f34b6
parentfc4bfd9a35f3d9cbf5ad6a20faedca71d1d9ed52
ALSA: seq: Fix leftovers at probe error path

The sequencer core module doesn't call some destructors in the error
path of the init code, which may leave some resources.

This patch mainly fix these leaks by calling the destructors
appropriately at alsa_seq_init().  Also the patch brings a few
cleanups along with it, namely:

- Expand the old "if ((err = xxx) < 0)" coding style
- Get rid of empty seq_queue_init() and its caller
- Change snd_seq_info_done() to void

Last but not least, a couple of functions lose __exit annotation since
they are called also in alsa_seq_init().

No functional changes but minor code cleanups.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq.c
sound/core/seq/seq_clientmgr.c
sound/core/seq/seq_info.c
sound/core/seq/seq_info.h
sound/core/seq/seq_queue.c
sound/core/seq/seq_queue.h