提交 31acaa50 编写于 作者: H Haiyang Zhang 提交者: 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: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NHank Janssen <hjanssen@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 6fbb4785
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册