projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[powerpc.git]
/
drivers
/
usb
/
core
/
devices.c
diff --git
a/drivers/usb/core/devices.c
b/drivers/usb/core/devices.c
index
a47c30b
..
aefc798
100644
(file)
--- a/
drivers/usb/core/devices.c
+++ b/
drivers/usb/core/devices.c
@@
-604,10
+604,6
@@
static unsigned int usb_device_poll(struct file *file, struct poll_table_struct
lock_kernel();
if (!st) {
st = kmalloc(sizeof(struct usb_device_status), GFP_KERNEL);
lock_kernel();
if (!st) {
st = kmalloc(sizeof(struct usb_device_status), GFP_KERNEL);
- if (!st) {
- unlock_kernel();
- return POLLIN;
- }
/* we may have dropped BKL - need to check for having lost the race */
if (file->private_data) {
/* we may have dropped BKL - need to check for having lost the race */
if (file->private_data) {
@@
-615,6
+611,11
@@
static unsigned int usb_device_poll(struct file *file, struct poll_table_struct
st = file->private_data;
goto lost_race;
}
st = file->private_data;
goto lost_race;
}
+ /* we haven't lost - check for allocation failure now */
+ if (!st) {
+ unlock_kernel();
+ return POLLIN;
+ }
/*
* need to prevent the module from being unloaded, since
/*
* need to prevent the module from being unloaded, since