Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2009 21:22:10 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187447 - head/sys/dev/usb
Message-ID:  <200901192122.n0JLMA57021610@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Mon Jan 19 21:22:10 2009
New Revision: 187447
URL: http://svn.freebsd.org/changeset/base/187447

Log:
  Set the pipe pointer before calling usbd_transfer() as its possible for the
  xfer callback to be invoked on error.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/usb/usbdi.c

Modified: head/sys/dev/usb/usbdi.c
==============================================================================
--- head/sys/dev/usb/usbdi.c	Mon Jan 19 21:10:04 2009	(r187446)
+++ head/sys/dev/usb/usbdi.c	Mon Jan 19 21:22:10 2009	(r187447)
@@ -237,8 +237,8 @@ usbd_open_pipe_intr(usbd_interface_handl
 	    USBD_NO_TIMEOUT, cb);
 	ipipe->intrxfer = xfer;
 	ipipe->repeat = 1;
-	err = usbd_transfer(xfer);
 	*pipe = ipipe;
+	err = usbd_transfer(xfer);
 	if (err != USBD_IN_PROGRESS && err)
 		goto bad2;
 	return (USBD_NORMAL_COMPLETION);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901192122.n0JLMA57021610>