Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268555
b: refs/heads/master
c: 2505aa6
h: refs/heads/master
i:
  268553: 6c31b8f
  268551: 6a6a235
v: v3
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Sep 30, 2011
1 parent 984fde4 commit 39203b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 0a2cc4977ffd551b58ae20c646bd7083ba5a89d2
refs/heads/master: 2505aa6ce42a686b2d3db95ccdcc7bc100e7b8c0
6 changes: 5 additions & 1 deletion trunk/drivers/staging/bcm/Bcmchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
RDM_BUFFER sRdmBuffer = {0};
PCHAR temp_buff;
UINT Bufflen;
u16 temp_value;

/* Copy Ioctl Buffer structure */
if (copy_from_user(&IoBuffer, argp, sizeof(IOCTL_BUFFER)))
Expand All @@ -221,7 +222,10 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
return -EINVAL;
}

Bufflen = IoBuffer.OutputLength + (4 - IoBuffer.OutputLength%4)%4;
Bufflen = IoBuffer.OutputLength;
temp_value = 4 - (Bufflen % 4);
Bufflen += temp_value % 4;

temp_buff = kmalloc(Bufflen, GFP_KERNEL);
if (!temp_buff)
return -ENOMEM;
Expand Down

0 comments on commit 39203b7

Please sign in to comment.