projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86148e8
)
[ALSA] Return error if no user TLV is defined
author
Takashi Iwai
<tiwai@suse.de>
Fri, 25 Aug 2006 09:39:34 +0000
(11:39 +0200)
committer
Jaroslav Kysela
<perex@suse.cz>
Sat, 23 Sep 2006 08:44:21 +0000
(10:44 +0200)
Retrun error to user TLV_READ ioctl if no TLV is defined.
(Until now, nothing was written and rerunred successfully.)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/core/control.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/control.c
b/sound/core/control.c
index 3030aaa6d2c5cd14d9be4113e7098755c6da4d06..6973a9686b679c6f3fc7a5415a1795ce043e6a76 100644
(file)
--- a/
sound/core/control.c
+++ b/
sound/core/control.c
@@
-951,6
+951,8
@@
static int snd_ctl_elem_user_tlv(struct snd_kcontrol *kcontrol,
ue->tlv_data = new_data;
ue->tlv_data_size = size;
} else {
+ if (! ue->tlv_data_size || ! ue->tlv_data)
+ return -ENXIO;
if (size < ue->tlv_data_size)
return -ENOSPC;
if (copy_to_user(tlv, ue->tlv_data, ue->tlv_data_size))