summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.name>2006-11-24 12:55:59 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-20 19:13:23 +0100
commit96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63 (patch)
tree7daca3e8dc0e9d400920f7bf5aacc7c548248f91 /drivers/usb
parentUSB: Fix oops in PhidgetServo (diff)
downloadlinux-96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63.tar.xz
linux-96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63.zip
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')
-rw-r--r--drivers/usb/misc/trancevibrator.c2
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)
struct trancevibrator *dev;
dev = usb_get_intfdata (interface);
- usb_set_intfdata(interface, NULL);
device_remove_file(&interface->dev, &dev_attr_speed);
+ usb_set_intfdata(interface, NULL);
usb_put_dev(dev->udev);
kfree(dev);
}