From 509ee3878b8f0f8908892579d679c123084f5ac5 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Sat, 27 Aug 2011 11:31:11 -0700 Subject: [PATCH] Staging: hv: netvsc: Cleanup alloc_net_device() Cleanup alloc_net_device(); we can directly set the refcnt. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/netvsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c index 75c6ed7b790a..772210268787 100644 --- a/drivers/staging/hv/netvsc.c +++ b/drivers/staging/hv/netvsc.c @@ -41,7 +41,7 @@ static struct netvsc_device *alloc_net_device(struct hv_device *device) return NULL; /* Set to 2 to allow both inbound and outbound traffic */ - atomic_cmpxchg(&net_device->refcnt, 0, 2); + atomic_set(&net_device->refcnt, 2); net_device->dev = device; device->ext = net_device; -- 2.20.1