diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-09-29 11:54:43 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-04 10:39:31 -0700 |
commit | 7f2bad4bd0d22f4cdd876152f1eeb9a8cfdc8d9d (patch) | |
tree | d9c0192b6d2e7a4ca8528420b1dbed4fba096e82 /drivers/staging/hv/hv_mouse.c | |
parent | 28e0d06655ddc6598155e2f71945f1abb00b398a (diff) | |
download | op-kernel-dev-7f2bad4bd0d22f4cdd876152f1eeb9a8cfdc8d9d.zip op-kernel-dev-7f2bad4bd0d22f4cdd876152f1eeb9a8cfdc8d9d.tar.gz |
Staging: hv: mousevsc: Fixup some bogus WARN_ON() calls
Fix the bogus WARN_ON() calls.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/hv_mouse.c')
-rw-r--r-- | drivers/staging/hv/hv_mouse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 69eb00e..016d7e5 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -200,7 +200,7 @@ static struct mousevsc_dev *alloc_input_device(struct hv_device *device) static void free_input_device(struct mousevsc_dev *device) { - WARN_ON(atomic_read(&device->ref_count) == 0); + WARN_ON(atomic_read(&device->ref_count) != 0); kfree(device); } @@ -327,7 +327,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device, /* Save the hid desc */ desc = &device_info->hid_descriptor; - WARN_ON(desc->bLength > 0); + WARN_ON(desc->bLength == 0); input_device->hid_desc = kzalloc(desc->bLength, GFP_KERNEL); @@ -447,7 +447,7 @@ static void mousevsc_on_receive(struct hv_device *device, break; case SynthHidInitialDeviceInfo: - WARN_ON(pipe_msg->size >= sizeof(struct hv_input_dev_info)); + WARN_ON(pipe_msg->size < sizeof(struct hv_input_dev_info)); /* * Parse out the device info into device attr, |