diff options
author | Oliver Neukum <oliver@neukum.name> | 2006-11-24 06:55:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-20 13:13:23 -0500 |
commit | 96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63 (patch) | |
tree | 7daca3e8dc0e9d400920f7bf5aacc7c548248f91 /drivers/usb/misc/trancevibrator.c | |
parent | 6a7255e1df3cf8f89c2c0c6eeea866c6bb17cfb9 (diff) |
USB: fix transvibrator disconnect race
in disconnect you set the interface's private data to NULL. In your IO
methods you unconditionally follow the pointer into never never land.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/trancevibrator.c')
-rw-r--r-- | drivers/usb/misc/trancevibrator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index 33cd91d11eca..67e2fc20eeeb 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c | |||
@@ -120,8 +120,8 @@ static void tv_disconnect(struct usb_interface *interface) | |||
120 | struct trancevibrator *dev; | 120 | struct trancevibrator *dev; |
121 | 121 | ||
122 | dev = usb_get_intfdata (interface); | 122 | dev = usb_get_intfdata (interface); |
123 | usb_set_intfdata(interface, NULL); | ||
124 | device_remove_file(&interface->dev, &dev_attr_speed); | 123 | device_remove_file(&interface->dev, &dev_attr_speed); |
124 | usb_set_intfdata(interface, NULL); | ||
125 | usb_put_dev(dev->udev); | 125 | usb_put_dev(dev->udev); |
126 | kfree(dev); | 126 | kfree(dev); |
127 | } | 127 | } |