[PATCH 2/2] staging: hv: Fix the WARN_ON condition in free_net_device()

From: Haiyang Zhang
Date: Fri Feb 18 2011 - 17:57:38 EST


In a previous commit, 7a09876d, ASSERT was changed to WARN_ON, but
the condition wasn't updated. This patch fixed this error.

Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
Signed-off-by: Hank Janssen <hjanssen@xxxxxxxxxxxxx>

---
drivers/staging/hv/netvsc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c
index f21a59d..20b1597 100644
--- a/drivers/staging/hv/netvsc.c
+++ b/drivers/staging/hv/netvsc.c
@@ -95,7 +95,7 @@ static struct netvsc_device *alloc_net_device(struct hv_device *device)

static void free_net_device(struct netvsc_device *device)
{
- WARN_ON(atomic_read(&device->refcnt) == 0);
+ WARN_ON(atomic_read(&device->refcnt) != 0);
device->dev->ext = NULL;
kfree(device);
}
--
1.6.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/