summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_jack.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-09 14:35:27 +0200
committerTakashi Iwai <tiwai@suse.de>2012-11-28 09:03:39 +0100
commit361dab3ec2c59044f420cdf232523cd4af4e833e (patch)
treea15a6119c598e83bdb5ca45676907c6c0a3645cb /sound/pci/hda/hda_jack.c
parent04324ccc75f96b3ed7aad1c866d1b7925e977bdf (diff)
ALSA: hda - Call snd_array_init() early and only once
This is a preliminary patch for introducing a protection to access races of snd_array instances. Call snd_array_init() appropriately at the initialization time and don't call it twice. Also the allocations of codec-spec structs are cleaned up by helper functions in patch_sigmatel.c and patch_analog.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_jack.c')
-rw-r--r--sound/pci/hda/hda_jack.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index 4e1948001338..6e9f57bbe667 100644
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -95,7 +95,6 @@ snd_hda_jack_tbl_new(struct hda_codec *codec, hda_nid_t nid)
struct hda_jack_tbl *jack = snd_hda_jack_tbl_get(codec, nid);
if (jack)
return jack;
- snd_array_init(&codec->jacktbl, sizeof(*jack), 16);
jack = snd_array_new(&codec->jacktbl);
if (!jack)
return NULL;