[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Link usb controller struct only when initialised
From: |
Oliver Henshaw |
Subject: |
[PATCH] Link usb controller struct only when initialised |
Date: |
Sun, 7 Jun 2009 19:37:58 +0100 |
When controller initialisation is aborted in grub_uhci_pci_iter
(grub_ohci_pci_iter) control
jumps to "fail:", where any allocated memory is freed. However, the
struct grub_uhci *u
(struct grub_ohci *o) for that controller remains linked to the list
of UHCI (OHCI)
controllers. This causes problems later, when grub iterates over
controllers to initialise
their ports.
The solution is to link only when the usb controller is successfully
initialised, and just
before returning from the function.
This patch is tested with real hardware and with qemu and the rescue image.
Thanks,
Oliver
usb-link-struct-after-init.patch
Description: Text Data
- [PATCH] Link usb controller struct only when initialised,
Oliver Henshaw <=