Skip to content

Commit

Permalink
staging: hv: remove unnecessary code in netvsc_probe().
Browse files Browse the repository at this point in the history
netif_carrier_off() was called earlier in this function, and there is
no other thread access this device yet. The status checking code is not
necessary here.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Haiyang Zhang authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent 6741d8e commit b1956a8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,17 +364,7 @@ static int netvsc_probe(struct hv_device *dev)
return ret;
}

/*
* If carrier is still off ie we did not get a link status callback,
* update it if necessary
*/
/*
* FIXME: We should use a atomic or test/set instead to avoid getting
* out of sync with the device's link status
*/
if (!netif_carrier_ok(net))
if (!device_info.link_state)
netif_carrier_on(net);
netif_carrier_on(net);

memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);

Expand Down

0 comments on commit b1956a8

Please sign in to comment.