diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-08-28 11:46:34 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-08-28 11:06:11 +0200 |
commit | c4f1957e14444e444b35418e85069b7ab65465a5 (patch) | |
tree | daf0764426a05ab9d35df0bd04e748296133f36c /sound/core | |
parent | 6f128fa41f310e1f39ebcea9621d2905549ecf52 (diff) |
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>
Diffstat (limited to 'sound/core')
-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"); |