Commit 4af12e55 authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman

Staging: w35und: usb_put_dev() is missing from wb35_disconnect()

The wb35_probe() function does usb_get_dev() so add a missing usb_put_dev() to
the wb35_disconnect() function. Also fix error handling paths in wb35_probe()
to call usb_put_dev() as well.
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c8b2b70b
...@@ -275,6 +275,7 @@ error_free_hw: ...@@ -275,6 +275,7 @@ error_free_hw:
error_free_adapter: error_free_adapter:
kfree(adapter); kfree(adapter);
error: error:
usb_put_dev(udev);
return err; return err;
} }
...@@ -308,12 +309,12 @@ void packet_came(char *pRxBufferAddress, int PacketSize) ...@@ -308,12 +309,12 @@ void packet_came(char *pRxBufferAddress, int PacketSize)
static void wb35_disconnect(struct usb_interface *intf) static void wb35_disconnect(struct usb_interface *intf)
{ {
struct wb35_adapter * adapter = usb_get_intfdata(intf); struct wb35_adapter *adapter = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
// Card remove
WbWlanHalt(adapter); WbWlanHalt(adapter);
usb_set_intfdata(intf, NULL);
usb_put_dev(interface_to_usbdev(intf));
} }
static struct usb_driver wb35_driver = { static struct usb_driver wb35_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment