From: H Hartley Sweeten Date: Mon, 24 Aug 2015 17:14:06 +0000 (-0700) Subject: staging: comedi: usbduxfast: remove unnecessary clearing of private data X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e48c9c260189e28b57ab3a7cf68c5a29ab6dbf51;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: usbduxfast: remove unnecessary clearing of private data 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 4c86a9a913cd..c6b2a6582127 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -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); }