From: Haiyang Zhang Date: Fri, 18 Feb 2011 23:05:53 +0000 (-0800) Subject: staging: hv: Fix the WARN_ON condition in free_net_device() X-Git-Tag: MMI-PSA29.97-13-9~20521^2~467 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31acaa50c6c61bfb486dacaa2ec62950a42de233;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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: Haiyang Zhang Signed-off-by: K. Y. Srinivasan Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c index f21a59db169c..20b159775e88 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); }