Reset controller::active_codec on uninit.

* The controller structure is static, so if you closed the device,
  and the driver failed to initialize correctly (ie. finds no codec)
  on the second try, it would have crashed accessing an already freed
  codec.
* Not sure why it fails to detect any codecs on second open, yet,
  though.
This commit is contained in:
Axel Dörfler
2012-09-23 11:16:28 +02:00
parent 751c6aba1c
commit 19559d24fc
@@ -1049,4 +1049,5 @@ hda_hw_uninit(hda_controller* controller)
if (controller->codecs[index] != NULL)
hda_codec_delete(controller->codecs[index]);
}
controller->active_codec = NULL;
}