summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2002-08-16 09:10:43 +0000
committerjoe <joe@FreeBSD.org>2002-08-16 09:10:43 +0000
commite8b4bb966f91ceddf30d861eaa2dc366bfb7a142 (patch)
treeb9cf879383c1916c7e63de2fd60df7031169449a /sys/dev/usb
parent30a4b05c041006c463281b6876ff6aebd91eeae2 (diff)
downloadFreeBSD-src-e8b4bb966f91ceddf30d861eaa2dc366bfb7a142.zip
FreeBSD-src-e8b4bb966f91ceddf30d861eaa2dc366bfb7a142.tar.gz
MFNetBSD:
revision 1.127 date: 2002/08/07 20:03:19; author: augustss; lines: +4 -8 Fix some braindead calls to free memory (only encountered under low memory conditions). From OpenBSD.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ohci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 501fd80..a20be66 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,6 +1,10 @@
/* $NetBSD: ohci.c,v 1.125 2002/05/28 12:42:38 augustss Exp $ */
/* $FreeBSD$ */
+/* Also, already ported:
+ * $NetBSD: ohci.c,v 1.127 2002/08/07 20:03:19 augustss Exp $
+ */
+
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -2063,10 +2067,8 @@ ohci_open(usbd_pipe_handle pipe)
opipe->sed = sed;
if (xfertype == UE_ISOCHRONOUS) {
sitd = ohci_alloc_sitd(sc);
- if (sitd == NULL) {
- ohci_free_sitd(sc, sitd);
+ if (sitd == NULL)
goto bad1;
- }
opipe->tail.itd = sitd;
tdphys = sitd->physaddr;
fmt = OHCI_ED_FORMAT_ISO;
@@ -2076,10 +2078,8 @@ ohci_open(usbd_pipe_handle pipe)
fmt |= OHCI_ED_DIR_OUT;
} else {
std = ohci_alloc_std(sc);
- if (std == NULL) {
- ohci_free_std(sc, std);
+ if (std == NULL)
goto bad1;
- }
opipe->tail.td = std;
tdphys = std->physaddr;
fmt = OHCI_ED_FORMAT_GEN | OHCI_ED_DIR_TD;
OpenPOWER on IntegriCloud