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

Commit 6f4c4446 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller
Browse files

net/hyperv: Correct the assignment in netvsc_recv_callback()



The first assignment to variable "net" is wrong, but overridden by the
latter assignments. So the bug isn't manifested.

Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5fccab3b
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -267,13 +267,10 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
int netvsc_recv_callback(struct hv_device *device_obj,
				struct hv_netvsc_packet *packet)
{
	struct net_device *net = dev_get_drvdata(&device_obj->device);
	struct net_device *net;
	struct sk_buff *skb;
	struct netvsc_device *net_device;

	net_device = hv_get_drvdata(device_obj);
	net = net_device->ndev;

	net = ((struct netvsc_device *)hv_get_drvdata(device_obj))->ndev;
	if (!net) {
		netdev_err(net, "got receive callback but net device"
			" not initialized yet\n");