[alsa-devel] [PATCH - ice1724 1/1] ALSA: ice1724 - Check for ac97 to avoid kernel oops
Takashi Iwai
tiwai at suse.de
Sun Jan 8 14:26:53 CET 2012
At Thu, 5 Jan 2012 23:05:18 +0100,
pavel.hofman at ivitera.com wrote:
>
> From: Pavel Hofman <pavel.hofman at ivitera.com>
>
> 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 at ivitera.com>
Applied now. Thanks.
Takashi
>
> diff --git a/pci/ice1712/amp.c b/pci/ice1712/amp.c
> index e328cfb..e525da2 100644
> --- a/pci/ice1712/amp.c
> +++ b/pci/ice1712/amp.c
> @@ -68,8 +68,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;
> }
>
> --
> 1.7.0.4
>
More information about the Alsa-devel
mailing list