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>
This commit is contained in:
Oliver Neukum 2006-11-24 12:55:59 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 6a7255e1df
Коммит 96ca014d53
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);
}