[net-next] liquidio: Missing error code in liquidio_init_nic_module()
diff mbox series

Message ID 20171114061417.ejguuk3tef3lq4r5@mwanda
State Accepted, archived
Delegated to: David Miller
Headers show
Series
  • [net-next] liquidio: Missing error code in liquidio_init_nic_module()
Related show

Commit Message

Dan Carpenter Nov. 14, 2017, 6:14 a.m. UTC
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@oracle.com>

Comments

David Miller Nov. 14, 2017, 1:01 p.m. UTC | #1
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 14 Nov 2017 09:14:17 +0300

> 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@oracle.com>

Applied.

Patch
diff mbox series

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;
 		}