Skip to content

Commit

Permalink
ALSA: opti-miro: fix OOPS if hardware is not detected
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krzysztof Helt authored and Takashi Iwai committed Nov 27, 2009
1 parent 9dc9120 commit 8700055
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/isa/opti9xx/miro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8700055

Please sign in to comment.