aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/opti9xx
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2009-11-27 05:20:56 -0500
committerTakashi Iwai <tiwai@suse.de>2009-11-27 05:21:40 -0500
commit8700055e0a30b3f67c1474b09200b59c32dd3796 (patch)
treee33e1179fb0ab43ae56c77dc8ee394403652e670 /sound/isa/opti9xx
parent9dc9120c774e1d7e3d939542200bd44829c0059d (diff)
ALSA: opti-miro: fix OOPS if hardware is not detected
If a hardware is not detected there is a kernel crash due to not initialized snd_miro->aci pointer. This pointer is initialized after detection of the opti (miro) chip. This bug was introduced by patches to expose ACI mikser outside the snd-miro driver. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/opti9xx')
-rw-r--r--sound/isa/opti9xx/miro.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 40b64cd54c85..e374869e3e21 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1229,7 +1229,8 @@ static void snd_card_miro_free(struct snd_card *card)
1229 struct snd_miro *miro = card->private_data; 1229 struct snd_miro *miro = card->private_data;
1230 1230
1231 release_and_free_resource(miro->res_aci_port); 1231 release_and_free_resource(miro->res_aci_port);
1232 miro->aci->aci_port = 0; 1232 if (miro->aci)
1233 miro->aci->aci_port = 0;
1233 release_and_free_resource(miro->res_mc_base); 1234 release_and_free_resource(miro->res_mc_base);
1234} 1235}
1235 1236