From: Oliver Neukum <[EMAIL PROTECTED]>

this driver sets intfdata to NULL while it still can be read and happily 
followed.

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 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 b63b5f3..d721380 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)
        struct cypress *dev;
 
        dev = usb_get_intfdata(interface);
-       usb_set_intfdata(interface, NULL);
 
        /* remove device attribute files */
        device_remove_file(&interface->dev, &dev_attr_port0);
        device_remove_file(&interface->dev, &dev_attr_port1);
+       /* the intfdata can be set to NULL only after the
+        * device files have been removed */
+       usb_set_intfdata(interface, NULL);
 
        usb_put_dev(dev->udev);
 
-- 
1.5.1.2


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to