Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56838
b: refs/heads/master
c: 57a21c1
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed May 23, 2007
1 parent 87209d8 commit d29a667
Show file tree
Hide file tree
Showing 2 changed files with 7 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: b89ee19ae6c0b5a0d9facca780b53959fbadd123
refs/heads/master: 57a21c1b929450b1e020c0a03cca6fa7448f4222
10 changes: 6 additions & 4 deletions trunk/drivers/usb/core/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ static int usb_parse_interface(struct device *ddev, int cfgno,
num_ep = USB_MAXENDPOINTS;
}

len = sizeof(struct usb_host_endpoint) * num_ep;
alt->endpoint = kzalloc(len, GFP_KERNEL);
if (!alt->endpoint)
return -ENOMEM;
if (num_ep > 0) { /* Can't allocate 0 bytes */
len = sizeof(struct usb_host_endpoint) * num_ep;
alt->endpoint = kzalloc(len, GFP_KERNEL);
if (!alt->endpoint)
return -ENOMEM;
}

/* Parse all the endpoint descriptors */
n = 0;
Expand Down

0 comments on commit d29a667

Please sign in to comment.