Skip to content

Commit

Permalink
staging: hv: fix reversed memset arguments in hv_mouse
Browse files Browse the repository at this point in the history
size is 3rd arg, not the 2nd.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dave Jones authored and Greg Kroah-Hartman committed Apr 5, 2011
1 parent 0ce790e commit 75e4fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/hv/hv_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct
desc->desc[0].wDescriptorLength);

/* Send the ack */
memset(&ack, sizeof(struct mousevsc_prt_msg), 0);
memset(&ack, 0, sizeof(struct mousevsc_prt_msg));

ack.type = PipeMessageData;
ack.size = sizeof(struct synthhid_device_info_ack);
Expand Down Expand Up @@ -595,7 +595,7 @@ static int MousevscConnectToVsp(struct hv_device *Device)
/*
* Now, initiate the vsc/vsp initialization protocol on the open channel
*/
memset(request, sizeof(struct mousevsc_prt_msg), 0);
memset(request, 0, sizeof(struct mousevsc_prt_msg));

request->type = PipeMessageData;
request->size = sizeof(struct synthhid_protocol_request);
Expand Down

0 comments on commit 75e4fb2

Please sign in to comment.