Commit 31acaa50 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Greg Kroah-Hartman

staging: hv: Fix the WARN_ON condition in free_net_device()

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: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6fbb4785
...@@ -95,7 +95,7 @@ static struct netvsc_device *alloc_net_device(struct hv_device *device) ...@@ -95,7 +95,7 @@ static struct netvsc_device *alloc_net_device(struct hv_device *device)
static void free_net_device(struct netvsc_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; device->dev->ext = NULL;
kfree(device); kfree(device);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment