Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281038
b: refs/heads/master
c: 27b7923
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Meyer authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 3092064 commit 6d77b45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 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: b401731985bfa7c02e4e5673a151b29ae7180fce
refs/heads/master: 27b7923035f737a7e6384d0084e34706ea068040
4 changes: 1 addition & 3 deletions trunk/drivers/staging/hv/hv_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,11 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
desc = &device_info->hid_descriptor;
WARN_ON(desc->bLength == 0);

input_device->hid_desc = kzalloc(desc->bLength, GFP_ATOMIC);
input_device->hid_desc = kmemdup(desc, desc->bLength, GFP_ATOMIC);

if (!input_device->hid_desc)
goto cleanup;

memcpy(input_device->hid_desc, desc, desc->bLength);

input_device->report_desc_size = desc->desc[0].wDescriptorLength;
if (input_device->report_desc_size == 0)
goto cleanup;
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/staging/hv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,14 @@ static int netvsc_init_recv_buf(struct hv_device *device)
net_device->recv_section_cnt = init_packet->msg.
v1_msg.send_recv_buf_complete.num_sections;

net_device->recv_section = kmalloc(net_device->recv_section_cnt
* sizeof(struct nvsp_1_receive_buffer_section), GFP_KERNEL);
net_device->recv_section = kmemdup(init_packet->msg.v1_msg.send_recv_buf_complete.sections,
net_device->recv_section_cnt * sizeof(struct nvsp_1_receive_buffer_section),
GFP_KERNEL);
if (net_device->recv_section == NULL) {
ret = -EINVAL;
goto cleanup;
}

memcpy(net_device->recv_section,
init_packet->msg.v1_msg.
send_recv_buf_complete.sections,
net_device->recv_section_cnt *
sizeof(struct nvsp_1_receive_buffer_section));

/*
* For 1st release, there should only be 1 section that represents the
* entire receive buffer
Expand Down

0 comments on commit 6d77b45

Please sign in to comment.