[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171114061417.ejguuk3tef3lq4r5@mwanda>
Date: Tue, 14 Nov 2017 09:14:17 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Derek Chickles <derek.chickles@...iumnetworks.com>,
Vijaya Mohan Guvva <vijaya.guvva@...ium.com>
Cc: Satanand Burla <satananda.burla@...iumnetworks.com>,
Felix Manlunas <felix.manlunas@...iumnetworks.com>,
Raghu Vatsavayi <raghu.vatsavayi@...iumnetworks.com>,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH net-next] liquidio: Missing error code in
liquidio_init_nic_module()
We accidentally return success if lio_vf_rep_modinit() fails instead of
propogating the error code.
Fixes: e20f469660ad ("liquidio: synchronize VF representor names with NIC firmware")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index f05045a69dcc..6aa0eee88ea5 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -4038,7 +4038,8 @@ static int liquidio_init_nic_module(struct octeon_device *oct)
*/
if (!oct->octeon_id &&
oct->fw_info.app_cap_flags & LIQUIDIO_SWITCHDEV_CAP) {
- if (lio_vf_rep_modinit()) {
+ retval = lio_vf_rep_modinit();
+ if (retval) {
liquidio_stop_nic_module(oct);
goto octnet_init_failure;
}
Powered by blists - more mailing lists