mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-10 08:24:20 -05:00
28 lines
998 B
Diff
28 lines
998 B
Diff
|
From 08ede038a738f22c1b3425051175e1d627d8dd43 Mon Sep 17 00:00:00 2001
|
||
|
From: Lu Guanqun <guanqun.lu@intel.com>
|
||
|
Date: Wed, 24 Aug 2011 14:45:10 +0800
|
||
|
Subject: [PATCH] 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>
|
||
|
---
|
||
|
sound/core/control.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/sound/core/control.c b/sound/core/control.c
|
||
|
index 7f2b3a7eabb2b..dc2a44048c850 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,
|
||
|
struct user_element *ue;
|
||
|
int idx, err;
|
||
|
|
||
|
- if (card->user_ctl_count >= MAX_USER_CONTROLS)
|
||
|
+ if (!replace && card->user_ctl_count >= MAX_USER_CONTROLS)
|
||
|
return -ENOMEM;
|
||
|
if (info->count < 1)
|
||
|
return -EINVAL;
|