From: Wei Yongjun Date: Wed, 11 Jan 2017 16:32:51 +0000 (+0000) Subject: net: thunderx: Fix error return code in nicvf_open() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60dce04b81424940a3183c8e7e81e1234a27e906;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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 */