diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-08-28 10:46:34 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-08-28 11:06:11 +0200 |
commit | c4f1957e14444e444b35418e85069b7ab65465a5 (patch) | |
tree | daf0764426a05ab9d35df0bd04e748296133f36c | |
parent | ALSA: pcm: signedness bug in snd_pcm_plug_alloc() (diff) | |
download | linux-c4f1957e14444e444b35418e85069b7ab65465a5.tar.xz linux-c4f1957e14444e444b35418e85069b7ab65465a5.zip |
ALSA: seq: add error check in snd_seq_system_client_init()
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 <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/core/seq/seq_system.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c index 8ce1d0b40dce..3b89b0adad6a 100644 --- a/sound/core/seq/seq_system.c +++ b/sound/core/seq/seq_system.c @@ -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"); |