From 7a9da71c5f276cdfd986ad81b2b344fc641bd0a7 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Sun, 24 Mar 2013 19:40:01 +0100 Subject: [PATCH] libpayload: EHCI - detach controller in ehci_shutdown() It shouldn't be used any more as we're about to free() the memory behind the controller -- therefore detach it. Change-Id: I875322a9940570c51d412a7f3bfb6af4ea3b3764 Signed-off-by: Mathias Krause Reviewed-on: http://review.coreboot.org/2899 Reviewed-by: Paul Menzel Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/drivers/usb/ehci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c index 972962cf51..3e5de1dc03 100644 --- a/payloads/libpayload/drivers/usb/ehci.c +++ b/payloads/libpayload/drivers/usb/ehci.c @@ -170,6 +170,7 @@ static int ehci_set_periodic_schedule(ehci_t *ehcic, int enable) static void ehci_shutdown (hci_t *controller) { + detach_controller(controller); /* Make sure periodic schedule is disabled */ ehci_set_periodic_schedule(EHCI_INST(controller), 0); /* Free periodic frame list */