projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b389a8
)
ALSA: hda - Fix possible NULL dereference in snd_hda_get_pin_label()
author
Takashi Iwai
<tiwai@suse.de>
Mon, 28 Oct 2013 10:39:23 +0000
(11:39 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 29 Oct 2013 10:37:19 +0000
(11:37 +0100)
Fix a possible NULL access of indexp in fill_audio_out_name() called
from snd_hda_get_pin_label().
Spotted by coverity CID 402035.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/hda/hda_auto_parser.c
b/sound/pci/hda/hda_auto_parser.c
index 48a9d004d6d938ac5365b52a83c6b67b7b18dcaa..853c6a69e29e81c04c9fda91ce3500cf6a60fcbc 100644
(file)
--- a/
sound/pci/hda/hda_auto_parser.c
+++ b/
sound/pci/hda/hda_auto_parser.c
@@
-638,7
+638,7
@@
static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid,
/* don't add channel suffix for Headphone controls */
int idx = get_hp_label_index(codec, nid, cfg->hp_pins,
cfg->hp_outs);
- if (idx >= 0)
+ if (idx >= 0
&& indexp
)
*indexp = idx;
sfx = "";
}