projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4ce908
)
USB: gadget: Remove suspended sysfs file before freeing cdev
author
Pavankumar Kondeti
<pkondeti@codeaurora.org>
Thu, 16 Dec 2010 09:02:25 +0000
(14:32 +0530)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 16 Dec 2010 23:45:44 +0000
(15:45 -0800)
cdev struct is accessed in suspended sysfs show function. So
remove sysfs file before freeing the cdev in composite_unbind.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/composite.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/composite.c
b/drivers/usb/gadget/composite.c
index
7b5cc16
..
96413a2
100644
(file)
--- a/
drivers/usb/gadget/composite.c
+++ b/
drivers/usb/gadget/composite.c
@@
-1047,9
+1047,9
@@
composite_unbind(struct usb_gadget *gadget)
kfree(cdev->req->buf);
usb_ep_free_request(gadget->ep0, cdev->req);
}
+ device_remove_file(&gadget->dev, &dev_attr_suspended);
kfree(cdev);
set_gadget_data(gadget, NULL);
- device_remove_file(&gadget->dev, &dev_attr_suspended);
composite = NULL;
}