aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-12 02:38:46 -0400
committerTakashi Iwai <tiwai@suse.de>2015-03-12 02:38:46 -0400
commite6826ef14597981f78156a0d5f9553b19f356e3f (patch)
tree30a19b996778016aefc2d47d5990f0c251d14a02 /sound/core
parent4945f1fdc14ef090abe50d1b5682bfc1e4763c06 (diff)
parentbe3bb8236db2d0fcd705062ae2e2a9d75131222f (diff)
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/control.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 833b223a363a..54a412af3224 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1207,6 +1207,11 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
1207 struct user_element *ue; 1207 struct user_element *ue;
1208 int err; 1208 int err;
1209 1209
1210 if (!*info->id.name)
1211 return -EINVAL;
1212 if (strnlen(info->id.name, sizeof(info->id.name)) >= sizeof(info->id.name))
1213 return -EINVAL;
1214
1210 /* Delete a control to replace them if needed. */ 1215 /* Delete a control to replace them if needed. */
1211 if (replace) { 1216 if (replace) {
1212 info->id.numid = 0; 1217 info->id.numid = 0;