staging: comedi: usbduxsigma: always clear the usb intfdata in (*detach)

Make sure the usb intfdata is always cleared when the device is
detached.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten
2013-07-29 17:47:44 -07:00
committed by Greg Kroah-Hartman
parent 71d7e1ee2c
commit 1da439008e

View File

@@ -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 */