staging: hv: Fix the WARN_ON condition in free_net_device()
authorHaiyang Zhang <haiyangz@microsoft.com>
Fri, 18 Feb 2011 23:05:53 +0000 (15:05 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Feb 2011 21:22:26 +0000 (13:22 -0800)
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@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/netvsc.c

index f21a59d..20b1597 100644 (file)
@@ -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);
 }