aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2012-02-05 07:13:09 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-05 17:44:55 -0500
commit6f4c44460750dd4eb9926a58ab1ad0ceacef8284 (patch)
tree64a81c0b73d425421c3acbd22f61051870b730f8 /drivers/net/hyperv
parent5fccab3b66d53883a97fc65e0c33f3ebf74e8ff9 (diff)
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: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r--drivers/net/hyperv/netvsc_drv.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 466c58a7353..0ae7a1a6aeb 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,
267int netvsc_recv_callback(struct hv_device *device_obj, 267int netvsc_recv_callback(struct hv_device *device_obj,
268 struct hv_netvsc_packet *packet) 268 struct hv_netvsc_packet *packet)
269{ 269{
270 struct net_device *net = dev_get_drvdata(&device_obj->device); 270 struct net_device *net;
271 struct sk_buff *skb; 271 struct sk_buff *skb;
272 struct netvsc_device *net_device;
273
274 net_device = hv_get_drvdata(device_obj);
275 net = net_device->ndev;
276 272
273 net = ((struct netvsc_device *)hv_get_drvdata(device_obj))->ndev;
277 if (!net) { 274 if (!net) {
278 netdev_err(net, "got receive callback but net device" 275 netdev_err(net, "got receive callback but net device"
279 " not initialized yet\n"); 276 " not initialized yet\n");