Skip to content

Commit

Permalink
staging: hv: Fix the WARN_ON condition in free_net_device()
Browse files Browse the repository at this point in the history
In a previous commit, 7a09876, 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>
  • Loading branch information
Haiyang Zhang authored and Greg Kroah-Hartman committed Feb 23, 2011
1 parent 6fbb478 commit 31acaa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/hv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 31acaa5

Please sign in to comment.