From e48c9c260189e28b57ab3a7cf68c5a29ab6dbf51 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 24 Aug 2015 10:14:06 -0700 Subject: [PATCH] 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 --- drivers/staging/comedi/drivers/usbduxfast.c | 6 ------ 1 file changed, 6 deletions(-) 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); } -- 2.39.5