Module Name: src
Committed By: riz
Date: Sat Jan 5 23:30:05 UTC 2013
Modified Files:
src/sys/dev/usb [netbsd-6]: ohci.c
Log Message:
Pull up following revision(s) (requested by skrll in ticket #765):
sys/dev/usb/ohci.c: revision 1.226
PR/41602
Fix a memory leak when ohci_device_setintr didn't return
USBD_NORMAL_COMPLETION.
ohci_setup_isoc always returns USBD_NORMAL_COMPLETION at the moment so
there's no chance of a leak there.
PR/41602
Fix a memory leak when ohci_device_setintr didn't return
USBD_NORMAL_COMPLETION.
ohci_setup_isoc always returns USBD_NORMAL_COMPLETION at the moment so
there's no chance of a leak there.
To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.218.8.1 src/sys/dev/usb/ohci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.218 src/sys/dev/usb/ohci.c:1.218.8.1
--- src/sys/dev/usb/ohci.c:1.218 Sun Aug 7 13:45:46 2011
+++ src/sys/dev/usb/ohci.c Sat Jan 5 23:30:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.218 2011/08/07 13:45:46 jmcneill Exp $ */
+/* $NetBSD: ohci.c,v 1.218.8.1 2013/01/05 23:30:04 riz Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
/*
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.218 2011/08/07 13:45:46 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.218.8.1 2013/01/05 23:30:04 riz Exp $");
#include "opt_usb.h"
@@ -2146,7 +2146,10 @@ ohci_open(usbd_pipe_handle pipe)
ival = pipe->interval;
if (ival == USBD_DEFAULT_INTERVAL)
ival = ed->bInterval;
- return (ohci_device_setintr(sc, opipe, ival));
+ err = ohci_device_setintr(sc, opipe, ival);
+ if (err)
+ goto bad;
+ break;
case UE_ISOCHRONOUS:
pipe->methods = &ohci_device_isoc_methods;
return (ohci_setup_isoc(pipe));