libpayload: Free usb host controller instance after shutdown

All shutdown() implementations but ehci_shutdown() free the hci_t
structure. This seems correct and the reference to the hci_t shouldn't
be used after shutdown(), so do it in ehci_shutdown(), too.

Change-Id: Ie3506d769e73007735f3211710734a5f0107e43a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1849
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Nico Huber 2012-11-12 15:35:44 +01:00 committed by Ronald G. Minnich
parent a482701451
commit d633dda995
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,9 @@ static void ehci_shutdown (hci_t *controller)
free(EHCI_INST(controller)->dummy_qh);
EHCI_INST(controller)->operation->configflag = 0;
free(EHCI_INST(controller));
free(controller);
}
enum { EHCI_OUT=0, EHCI_IN=1, EHCI_SETUP=2 };