Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;