Skip to content

Commit

Permalink
ALSA: seq: add error check in snd_seq_system_client_init()
Browse files Browse the repository at this point in the history
Static checkers complain that snd_seq_create_kernel_client() can return
-EBUSY here so we need to have some error handling.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Dan Carpenter authored and tiwai committed Aug 28, 2018
1 parent 6f128fa commit c4f1957
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/core/seq/seq_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ int __init snd_seq_system_client_init(void)

/* register client */
sysclient = snd_seq_create_kernel_client(NULL, 0, "System");
if (sysclient < 0) {
kfree(port);
return sysclient;
}

/* register timer */
strcpy(port->name, "Timer");
Expand Down

0 comments on commit c4f1957

Please sign in to comment.