aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@intel.com>2011-08-24 02:45:10 -0400
committerTakashi Iwai <tiwai@suse.de>2011-08-24 04:22:43 -0400
commit08ede038a738f22c1b3425051175e1d627d8dd43 (patch)
tree84cadd30322f1c68fcfbbb869cb8bf8f9447989c
parent983929cafc4225d61f50b3e35cf892606a15bc69 (diff)
ALSA: core: release the constraint check for replace ops
Suppose the ALSA card already has a number of MAX_USER_CONTROLS controls, and the user wants to replace one, it should not fail at this condition check. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/core/control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 7f2b3a7eabb2..dc2a44048c85 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1073,7 +1073,7 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
1073 struct user_element *ue; 1073 struct user_element *ue;
1074 int idx, err; 1074 int idx, err;
1075 1075
1076 if (card->user_ctl_count >= MAX_USER_CONTROLS) 1076 if (!replace && card->user_ctl_count >= MAX_USER_CONTROLS)
1077 return -ENOMEM; 1077 return -ENOMEM;
1078 if (info->count < 1) 1078 if (info->count < 1)
1079 return -EINVAL; 1079 return -EINVAL;