Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195180
b: refs/heads/master
c: 175c044
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and David S. Miller committed May 18, 2010
1 parent 4d974cc commit cb21ba3
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 08d18f3b62b4c05731a09eca2b432842a0a18da5
refs/heads/master: 175c04414106c34f0130d8d3bf152825b4829ceb
6 changes: 2 additions & 4 deletions trunk/drivers/net/usb/pegasus.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,12 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
char *buffer;
DECLARE_WAITQUEUE(wait, current);

buffer = kmalloc(size, GFP_KERNEL);
buffer = kmemdup(data, size, GFP_KERNEL);
if (!buffer) {
netif_warn(pegasus, drv, pegasus->net,
"out of memory in %s\n", __func__);
return -ENOMEM;
}
memcpy(buffer, data, size);

add_wait_queue(&pegasus->ctrl_wait, &wait);
set_current_state(TASK_UNINTERRUPTIBLE);
Expand Down Expand Up @@ -255,13 +254,12 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
char *tmp;
DECLARE_WAITQUEUE(wait, current);

tmp = kmalloc(1, GFP_KERNEL);
tmp = kmemdup(&data, 1, GFP_KERNEL);
if (!tmp) {
netif_warn(pegasus, drv, pegasus->net,
"out of memory in %s\n", __func__);
return -ENOMEM;
}
memcpy(tmp, &data, 1);
add_wait_queue(&pegasus->ctrl_wait, &wait);
set_current_state(TASK_UNINTERRUPTIBLE);
while (pegasus->flags & ETH_REGS_CHANGED)
Expand Down

0 comments on commit cb21ba3

Please sign in to comment.