Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48730
b: refs/heads/master
c: 6957e1a
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Feb 16, 2007
1 parent 6c9957d commit c6f18f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5999f0da73b7f46435a67671c8861ed14a94c4e
refs/heads/master: 6957e1ac9c498ff934eaf1b7591b5ea1c98b6e54
9 changes: 5 additions & 4 deletions trunk/drivers/usb/core/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,17 +604,18 @@ 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);
if (!st) {
unlock_kernel();
return POLLIN;
}

/* we may have dropped BKL - need to check for having lost the race */
if (file->private_data) {
kfree(st);
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
Expand Down

0 comments on commit c6f18f3

Please sign in to comment.