2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
* bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after initialising controller. * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
This commit is contained in:
parent
255a27d434
commit
e23721e8af
3 changed files with 14 additions and 5 deletions
|
@ -174,8 +174,6 @@ grub_uhci_pci_iter (int bus, int device, int func,
|
|||
if (! u)
|
||||
return 1;
|
||||
|
||||
u->next = uhci;
|
||||
uhci = u;
|
||||
u->iobase = base & GRUB_UHCI_IOMASK;
|
||||
u->framelist = 0;
|
||||
u->qh = 0;
|
||||
|
@ -288,6 +286,10 @@ grub_uhci_pci_iter (int bus, int device, int func,
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Link to uhci now that initialisation is successful. */
|
||||
u->next = uhci;
|
||||
uhci = u;
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue