diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-05-30 14:33:44 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-06-22 06:27:50 -0400 |
commit | ce43fbaececc82196d321671159483b3287de128 (patch) | |
tree | f3f0895f33d80d59a4e630d266dc2c8695dcf924 /sound/pci/hda/hda_intel.c | |
parent | b6a969155b04416185f368bd4e2f1d49b17c1ee1 (diff) |
[ALSA] hda-intel - Fix Oops in the error path
HDA Intel driver
Fixed Oops in the error path from probe function of snd-hda-intel driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index f05a6384b9c0..0d546addc091 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -286,6 +286,7 @@ struct snd_azx { | |||
286 | 286 | ||
287 | /* flags */ | 287 | /* flags */ |
288 | int position_fix; | 288 | int position_fix; |
289 | unsigned int initialized: 1; | ||
289 | }; | 290 | }; |
290 | 291 | ||
291 | /* | 292 | /* |
@@ -1235,7 +1236,7 @@ static int azx_resume(snd_card_t *card) | |||
1235 | */ | 1236 | */ |
1236 | static int azx_free(azx_t *chip) | 1237 | static int azx_free(azx_t *chip) |
1237 | { | 1238 | { |
1238 | if (chip->remap_addr) { | 1239 | if (chip->initialized) { |
1239 | int i; | 1240 | int i; |
1240 | 1241 | ||
1241 | for (i = 0; i < MAX_ICH6_DEV; i++) | 1242 | for (i = 0; i < MAX_ICH6_DEV; i++) |
@@ -1361,6 +1362,8 @@ static int __devinit azx_create(snd_card_t *card, struct pci_dev *pci, | |||
1361 | /* initialize chip */ | 1362 | /* initialize chip */ |
1362 | azx_init_chip(chip); | 1363 | azx_init_chip(chip); |
1363 | 1364 | ||
1365 | chip->initialized = 1; | ||
1366 | |||
1364 | /* codec detection */ | 1367 | /* codec detection */ |
1365 | if (! chip->codec_mask) { | 1368 | if (! chip->codec_mask) { |
1366 | snd_printk(KERN_ERR SFX "no codecs found!\n"); | 1369 | snd_printk(KERN_ERR SFX "no codecs found!\n"); |