lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170111163251.19367-1-weiyj.lk@gmail.com>
Date:   Wed, 11 Jan 2017 16:32:51 +0000
From:   Wei Yongjun <weiyj.lk@...il.com>
To:     Sunil Goutham <sgoutham@...ium.com>,
        Robert Richter <rric@...nel.org>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>,
        linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org
Subject: [PATCH net-next] net: thunderx: Fix error return code in nicvf_open()

From: Wei Yongjun <weiyongjun1@...wei.com>

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@...wei.com>
---
 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index 273eafd..a25bb6e 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 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ