# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.600.1.2 -> 1.600.1.3 # drivers/usb/host/ohci-hcd.c 1.22 -> 1.23 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/04 zwane@mwaikambo.name 1.600.1.3 # [PATCH] pci_free_consistent on ohci initialisation failure # # The trace at the end of the message shows the init failure. # -------------------------------------------- # diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c Thu Sep 5 08:51:41 2002 +++ b/drivers/usb/host/ohci-hcd.c Thu Sep 5 08:51:41 2002 @@ -621,9 +621,12 @@ hc_reset (ohci); ohci_mem_cleanup (ohci); - - pci_free_consistent (ohci->hcd.pdev, sizeof *ohci->hcca, - ohci->hcca, ohci->hcca_dma); + if (ohci->hcca) { + pci_free_consistent (ohci->hcd.pdev, sizeof *ohci->hcca, + ohci->hcca, ohci->hcca_dma); + ohci->hcca = NULL; + ohci->hcca_dma = 0; + } } /*-------------------------------------------------------------------------*/