[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>
This commit is contained in:
parent
b6a969155b
commit
ce43fbaece
|
@ -286,6 +286,7 @@ struct snd_azx {
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
int position_fix;
|
int position_fix;
|
||||||
|
unsigned int initialized: 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1235,7 +1236,7 @@ static int azx_resume(snd_card_t *card)
|
||||||
*/
|
*/
|
||||||
static int azx_free(azx_t *chip)
|
static int azx_free(azx_t *chip)
|
||||||
{
|
{
|
||||||
if (chip->remap_addr) {
|
if (chip->initialized) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAX_ICH6_DEV; i++)
|
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,
|
||||||
/* initialize chip */
|
/* initialize chip */
|
||||||
azx_init_chip(chip);
|
azx_init_chip(chip);
|
||||||
|
|
||||||
|
chip->initialized = 1;
|
||||||
|
|
||||||
/* codec detection */
|
/* codec detection */
|
||||||
if (! chip->codec_mask) {
|
if (! chip->codec_mask) {
|
||||||
snd_printk(KERN_ERR SFX "no codecs found!\n");
|
snd_printk(KERN_ERR SFX "no codecs found!\n");
|
||||||
|
|
Loading…
Reference in New Issue