net: hns3: Fixes the static checker error warning in hns3_get_link_ksettings()
authorSalil <salil.mehta@huawei.com>
Fri, 18 Aug 2017 11:31:38 +0000 (12:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Aug 2017 17:31:56 +0000 (10:31 -0700)
commit9db85f33c0d724ce9251ad80dff49aa7bdbd95af
tree99f0645d93ca7bcf49e5e533c234bcdf94070e7a
parentd36d36ceac11e514f1c313ea6ca7568e2463b6f2
net: hns3: Fixes the static checker error warning in hns3_get_link_ksettings()

This patch fixes the static check error warning in hns3_get_link_ksettings()
function by re-arranging the code.

Fixes: 496d03e960ae ("net: hns3: Add Ethtool support to HNS3 Driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c