diff options
-rw-r--r-- | drivers/usb/misc/cypress_cy7c63.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index b63b5f34b2aa..d721380b242d 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c | |||
@@ -246,11 +246,13 @@ static void cypress_disconnect(struct usb_interface *interface) | |||
246 | struct cypress *dev; | 246 | struct cypress *dev; |
247 | 247 | ||
248 | dev = usb_get_intfdata(interface); | 248 | dev = usb_get_intfdata(interface); |
249 | usb_set_intfdata(interface, NULL); | ||
250 | 249 | ||
251 | /* remove device attribute files */ | 250 | /* remove device attribute files */ |
252 | device_remove_file(&interface->dev, &dev_attr_port0); | 251 | device_remove_file(&interface->dev, &dev_attr_port0); |
253 | device_remove_file(&interface->dev, &dev_attr_port1); | 252 | device_remove_file(&interface->dev, &dev_attr_port1); |
253 | /* the intfdata can be set to NULL only after the | ||
254 | * device files have been removed */ | ||
255 | usb_set_intfdata(interface, NULL); | ||
254 | 256 | ||
255 | usb_put_dev(dev->udev); | 257 | usb_put_dev(dev->udev); |
256 | 258 | ||