[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1317322504-9788-3-git-send-email-kys@microsoft.com>
Date: Thu, 29 Sep 2011 11:54:43 -0700
From: "K. Y. Srinivasan" <kys@...rosoft.com>
To: gregkh@...e.de, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, virtualization@...ts.osdl.org,
ohering@...e.com
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>
Subject: [PATCH 03/24] Staging: hv: mousevsc: Fixup some bogus WARN_ON() calls
Fix the bogus WARN_ON() calls.
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
---
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,
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists