projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4e09aa
)
ALSA: hda - Add sanity check for storing the user-defined pin configs
author
Takashi Iwai
<tiwai@suse.de>
Sun, 27 Dec 2009 10:24:56 +0000
(11:24 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Sun, 27 Dec 2009 12:39:25 +0000
(13:39 +0100)
Check whether the given NID is a pin widget before storing the
user-defined pin configs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/hda_codec.c
b/sound/pci/hda/hda_codec.c
index 94ae69f209251f304e045dbbbe9f4a7919a01b8e..d02ea8926e7e7913d00a7a3b0c7b1c722d82d55f 100644
(file)
--- a/
sound/pci/hda/hda_codec.c
+++ b/
sound/pci/hda/hda_codec.c
@@
-824,6
+824,9
@@
int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list,
struct hda_pincfg *pin;
unsigned int oldcfg;
+ if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN)
+ return -EINVAL;
+
oldcfg = snd_hda_codec_get_pincfg(codec, nid);
pin = look_up_pincfg(codec, list, nid);
if (!pin) {