OSDN Git Service

ucm: Fix segfault when device argument is missing from _sw{dev, mod}
authorJuho Hämäläinen <juho.hamalainen@tieto.com>
Fri, 24 May 2013 11:01:25 +0000 (14:01 +0300)
committerTakashi Iwai <tiwai@suse.de>
Fri, 24 May 2013 11:03:54 +0000 (13:03 +0200)
Signed-off-by: Juho Hämäläinen <juho.hamalainen@tieto.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/ucm/main.c

index d38b7fa..0494728 100644 (file)
@@ -1647,7 +1647,8 @@ int snd_use_case_set(snd_use_case_mgr_t *uc_mgr,
                                goto __end;
                         }
                 } else {
-                        str = NULL;
+                        err = -EINVAL;
+                        goto __end;
                 }
                 if (check_identifier(identifier, "_swdev"))
                         err = switch_device(uc_mgr, str, value);