[PATCH] opti-miro: fix OOPS if hardware is not detected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Krzysztof Helt <krzysztof.h1@xxxxx>

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@xxxxx>
---

 sound/isa/opti9xx/miro.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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);
 }
 
-- 
1.6.4


----------------------------------------------------------------------
Wygraj pobyt w Alpach dla ca³ej rodziny
Kliknij >>> http://link.interia.pl/f2446

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux