From 70f9bf65a4413cb3c7405b2078efb8b27acc7222 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Sun, 18 Nov 2012 13:23:28 +0100 Subject: [PATCH] USB: opticon: move read-urb deallocation to release Move read-urb deallocation from disconnect to release. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/opticon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index e275abb9a1ec..77700b0720c6 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -523,13 +523,13 @@ static void opticon_disconnect(struct usb_serial *serial) struct opticon_private *priv = usb_get_serial_data(serial); usb_kill_urb(priv->bulk_read_urb); - usb_free_urb(priv->bulk_read_urb); } static void opticon_release(struct usb_serial *serial) { struct opticon_private *priv = usb_get_serial_data(serial); + usb_free_urb(priv->bulk_read_urb); kfree(priv->bulk_in_buffer); kfree(priv); } -- 2.20.1