]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: usbduxsigma: always clear the usb intfdata in (*detach)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 30 Jul 2013 00:47:44 +0000 (17:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2013 00:44:59 +0000 (17:44 -0700)
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>
drivers/staging/comedi/drivers/usbduxsigma.c

index 636209458a66d07bdc33ad52a4650d073b24c38e..60815a3ec540f2831872d78202174f4ac017717b 100644 (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 */