diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-01-11 19:32:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-12 00:12:01 +0300 |
commit | 60dce04b81424940a3183c8e7e81e1234a27e906 (patch) | |
tree | f164d01ba96152d50105e887e8ff81ae1070e275 /drivers/net/ethernet/cavium | |
parent | b40296fc73f58f98b595164d52d9bfe99216efa6 (diff) | |
download | linux-60dce04b81424940a3183c8e7e81e1234a27e906.tar.xz |
net: thunderx: Fix error return code in nicvf_open()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 712c31853440 ("net: thunderx: Program LMAC credits based on MTU")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium')
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/nicvf_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index 273eafdb1c57..a25bb6ea2ff4 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -1274,7 +1274,8 @@ int nicvf_open(struct net_device *netdev) /* Configure receive side scaling and MTU */ if (!nic->sqs_mode) { nicvf_rss_init(nic); - if (nicvf_update_hw_max_frs(nic, netdev->mtu)) + err = nicvf_update_hw_max_frs(nic, netdev->mtu); + if (err) goto cleanup; /* Clear percpu stats */ |