Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192756
b: refs/heads/master
c: 24f222e
h: refs/heads/master
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent ad4b183 commit 872a8bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 52897d86b1f0c8639e4b132b6b4ab1973694650f
refs/heads/master: 24f222e77ad62e41b1a882c77feeb8268c80b909
13 changes: 11 additions & 2 deletions trunk/drivers/media/video/gspca/t613.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@ static void reg_w_buf(struct gspca_dev *gspca_dev,
u8 *tmpbuf;

tmpbuf = kmalloc(len, GFP_KERNEL);
if (!tmpbuf) {
err("Out of memory");
return;
}
memcpy(tmpbuf, buffer, len);
usb_control_msg(gspca_dev->dev,
usb_sndctrlpipe(gspca_dev->dev, 0),
Expand All @@ -542,10 +546,15 @@ static void reg_w_ixbuf(struct gspca_dev *gspca_dev,
int i;
u8 *p, *tmpbuf;

if (len * 2 <= USB_BUF_SZ)
if (len * 2 <= USB_BUF_SZ) {
p = tmpbuf = gspca_dev->usb_buf;
else
} else {
p = tmpbuf = kmalloc(len * 2, GFP_KERNEL);
if (!tmpbuf) {
err("Out of memory");
return;
}
}
i = len;
while (--i >= 0) {
*p++ = reg++;
Expand Down

0 comments on commit 872a8bb

Please sign in to comment.