aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/control.c')
-rw-r--r--sound/core/control.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 268ab7471224..439ce64f9d82 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -237,8 +237,9 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
237 access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : 237 access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
238 (ncontrol->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE| 238 (ncontrol->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|
239 SNDRV_CTL_ELEM_ACCESS_INACTIVE| 239 SNDRV_CTL_ELEM_ACCESS_INACTIVE|
240 SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE| 240 SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE|
241 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)); 241 SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND|
242 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK));
242 kctl.info = ncontrol->info; 243 kctl.info = ncontrol->info;
243 kctl.get = ncontrol->get; 244 kctl.get = ncontrol->get;
244 kctl.put = ncontrol->put; 245 kctl.put = ncontrol->put;
@@ -1099,7 +1100,7 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file,
1099 1100
1100 if (copy_from_user(&tlv, _tlv, sizeof(tlv))) 1101 if (copy_from_user(&tlv, _tlv, sizeof(tlv)))
1101 return -EFAULT; 1102 return -EFAULT;
1102 if (tlv.length < sizeof(unsigned int) * 3) 1103 if (tlv.length < sizeof(unsigned int) * 2)
1103 return -EINVAL; 1104 return -EINVAL;
1104 down_read(&card->controls_rwsem); 1105 down_read(&card->controls_rwsem);
1105 kctl = snd_ctl_find_numid(card, tlv.numid); 1106 kctl = snd_ctl_find_numid(card, tlv.numid);