From: Krzysztof Helt Date: Fri, 27 Nov 2009 10:20:56 +0000 (+0100) Subject: ALSA: opti-miro: fix OOPS if hardware is not detected X-Git-Tag: v2.6.33-rc1~77^2~16^2~8^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8700055e0a30b3f67c1474b09200b59c32dd3796;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 40b64cd..e374869 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) struct snd_miro *miro = card->private_data; release_and_free_resource(miro->res_aci_port); - miro->aci->aci_port = 0; + if (miro->aci) + miro->aci->aci_port = 0; release_and_free_resource(miro->res_mc_base); }