Commit 509ee387 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: netvsc: Cleanup alloc_net_device()

Cleanup alloc_net_device(); we can directly set the refcnt.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 356c4657
......@@ -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;
......
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