From: Haiyang Zhang Date: Mon, 23 May 2011 16:03:45 +0000 (-0700) Subject: staging: hv: remove unnecessary code in netvsc_probe(). X-Git-Tag: MMI-PSA29.97-13-9~18845^2~568^2~90 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b1956a81af0c23d65a4cafee9e39c52e4c6cadcc;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: hv: remove unnecessary code in netvsc_probe(). 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 Signed-off-by: K. Y. Srinivasan Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 7b9c229f7295..456d3dfebf9b 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -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);