Skip to content

Commit

Permalink
USB: opticon: move read-urb deallocation to release
Browse files Browse the repository at this point in the history
Move read-urb deallocation from disconnect to release.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Nov 21, 2012
1 parent a0a5fd9 commit 70f9bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/opticon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 70f9bf6

Please sign in to comment.