Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8700055e authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Takashi Iwai
Browse files

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: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9dc9120c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1229,6 +1229,7 @@ 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);
	if (miro->aci)
		miro->aci->aci_port = 0;
	release_and_free_resource(miro->res_mc_base);
}