staging: comedi: usbduxfast: remove unnecessary clearing of private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 24 Aug 2015 17:14:06 +0000 (10:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:26 +0000 (18:24 -0700)
The clearing of the private data members in the (*detatch) is not
necessary. The comedi core is going to kfree the private data as soon
as the (*detach) finishes.

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/usbduxfast.c

index 4c86a9a913cd32ea2100fb78884a70e8129840fb..c6b2a65821271384f9e9d7d1ac5eabdcd86278a4 100644 (file)
@@ -998,16 +998,10 @@ static void usbduxfast_detach(struct comedi_device *dev)
                usb_kill_urb(devpriv->urb);
 
                kfree(devpriv->inbuf);
-               devpriv->inbuf = NULL;
-
                usb_free_urb(devpriv->urb);
-               devpriv->urb = NULL;
        }
 
        kfree(devpriv->duxbuf);
-       devpriv->duxbuf = NULL;
-
-       devpriv->ai_cmd_running = 0;
 
        up(&devpriv->sem);
 }