diff options
author | Pavel Hofman <pavel.hofman@ivitera.com> | 2012-01-05 23:05:18 +0100 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2012-02-11 15:38:24 +0100 |
commit | 2533c024c6feaa2deb21fde197de099de70334c3 (patch) | |
tree | 4c0d9e767210ca1160ecf5c6d26c03fbbf78c6b4 /sound | |
parent | d6cca2359c5b61d5a8ebecc04e4f2a4a074583cd (diff) |
ALSA: ice1724 - Check for ac97 to avoid kernel oops
commit e7848163aa2a649d9065f230fadff80dc3519775 upstream.
Cards with identical PCI ids but no AC97 config in EEPROM do not have
the ac97 field initialized. We must check for this case to avoid kernel oops.
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ice1712/amp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c index 37564300b50..ee6d599d0a1 100644 --- a/sound/pci/ice1712/amp.c +++ b/sound/pci/ice1712/amp.c @@ -67,8 +67,11 @@ static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice) static int __devinit snd_vt1724_amp_add_controls(struct snd_ice1712 *ice) { - /* we use pins 39 and 41 of the VT1616 for left and right read outputs */ - snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) & ~0x8000); + if (ice->ac97) + /* we use pins 39 and 41 of the VT1616 for left and right + read outputs */ + snd_ac97_write_cache(ice->ac97, 0x5a, + snd_ac97_read(ice->ac97, 0x5a) & ~0x8000); return 0; } |