41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From: Haiyang Zhang <haiyangz@microsoft.com>
|
|
Date: Sun, 5 Feb 2012 12:13:09 +0000
|
|
Subject: [PATCH 46/77] net/hyperv: Correct the assignment in
|
|
netvsc_recv_callback()
|
|
|
|
commit 6f4c44460750dd4eb9926a58ab1ad0ceacef8284 upstream.
|
|
|
|
The first assignment to variable "net" is wrong, but overridden by the
|
|
latter assignments. So the bug isn't manifested.
|
|
|
|
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
|
|
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/hyperv/netvsc_drv.c | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
|
|
index 466c58a..0ae7a1a 100644
|
|
--- a/drivers/net/hyperv/netvsc_drv.c
|
|
+++ b/drivers/net/hyperv/netvsc_drv.c
|
|
@@ -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");
|
|
--
|
|
1.7.9.5
|
|
|