lkml.org 
[lkml]   [2008]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] w35und: usb_put_dev() is missing from wb35_disconnect()
From: Pekka Enberg <penberg@cs.helsinki.fi>

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.

Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
drivers/staging/winbond/linux/wbusb.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
index 582ede4..128b70a 100644
--- a/drivers/staging/winbond/linux/wbusb.c
+++ b/drivers/staging/winbond/linux/wbusb.c
@@ -277,6 +277,7 @@ error_free_hw:
error_free_adapter:
kfree(adapter);
error:
+ usb_put_dev(udev);
return err;
}

@@ -310,12 +311,12 @@ void packet_came(char *pRxBufferAddress, int PacketSize)

static void wb35_disconnect(struct usb_interface *intf)
{
- struct wb35_adapter * adapter = usb_get_intfdata(intf);
- usb_set_intfdata(intf, NULL);
+ struct wb35_adapter *adapter = usb_get_intfdata(intf);

- // Card remove
WbWlanHalt(adapter);

+ usb_set_intfdata(intf, NULL);
+ usb_put_dev(interface_to_usbdev(intf));
}

static struct usb_driver wb35_driver = {
--
1.5.3.7


\
 
 \ /
  Last update: 2008-10-27 22:31    [W:0.021 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site