* [PATCH] w35und: usb_put_dev() is missing from wb35_disconnect()
@ 2008-10-27 21:29 Pekka J Enberg
2008-10-28 19:27 ` Pavel Machek
0 siblings, 1 reply; 2+ messages in thread
From: Pekka J Enberg @ 2008-10-27 21:29 UTC (permalink / raw)
To: greg; +Cc: pavel, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] w35und: usb_put_dev() is missing from wb35_disconnect()
2008-10-27 21:29 [PATCH] w35und: usb_put_dev() is missing from wb35_disconnect() Pekka J Enberg
@ 2008-10-28 19:27 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2008-10-28 19:27 UTC (permalink / raw)
To: Pekka J Enberg; +Cc: greg, linux-kernel
On Mon 2008-10-27 23:29:31, Pekka J Enberg wrote:
> 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.
Acked-by: Pavel Machek <pavel@suse.cz>
...and thanks for all the patches. I don't think I ever tested module
removal on this one...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-28 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-27 21:29 [PATCH] w35und: usb_put_dev() is missing from wb35_disconnect() Pekka J Enberg
2008-10-28 19:27 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®