Make sure the usb intfdata is always cleared when the device is
detached.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/comedi/drivers/usbduxsigma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c
b/drivers/staging/comedi/drivers/usbduxsigma.c
index 6362094..60815a3 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -1703,11 +1703,11 @@ static void usbduxsigma_detach(struct comedi_device
*dev)
struct usb_interface *intf = comedi_to_usb_interface(dev);
struct usbduxsigma_private *devpriv = dev->private;
+ usb_set_intfdata(intf, NULL);
+
if (!devpriv)
return;
- usb_set_intfdata(intf, NULL);
-
down(&devpriv->sem);
/* force unlink all urbs */
--
1.8.3.2
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel